Commit 37dfa300 authored by Sebastian Krzyszkowiak's avatar Sebastian Krzyszkowiak
Browse files

usb: typec: tipd: Read active PDO on probe


Signed-off-by: Sebastian Krzyszkowiak's avatarSebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
parent cebf129b
......@@ -990,6 +990,13 @@ static int tps6598x_probe(struct i2c_client *client)
ret = tps6598x_connect(tps, status);
if (ret)
dev_err(&client->dev, "failed to register partner\n");
if ((TPS_POWER_STATUS_PWROPMODE(tps->pwr_status) == TYPEC_PWR_MODE_PD) &&
(!(status & TPS_STATUS_PORTROLE))) {
ret = tps6598x_get_active_pd_contract(tps);
if (ret)
dev_err(tps->dev, "failed to read pd contract: %d\n", ret);
}
} else {
tps6598x_mask_cc_int(tps, true);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment