Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: typec: tipd: Use read_power_status function in probe

We need the initial power status to be able to reliably detect connector
changes once we introduce de-bouncing for CD321x next. read_power_status
takes care of this and also forwards the status to the trace subsystem
so let's use that instead of open-coding it inside probe.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Sven Peter <sven@kernel.org>
Link: https://lore.kernel.org/r/20250914-apple-usb3-tipd-v1-9-4e99c8649024@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Hector Martin and committed by
Greg Kroah-Hartman
77ed2f45 36c791c1

+1 -4
+1 -4
drivers/usb/typec/tipd/core.c
··· 1549 1549 goto err_role_put; 1550 1550 1551 1551 if (status & TPS_STATUS_PLUG_PRESENT) { 1552 - ret = tps6598x_read16(tps, TPS_REG_POWER_STATUS, &tps->pwr_status); 1553 - if (ret < 0) { 1554 - dev_err(tps->dev, "failed to read power status: %d\n", ret); 1552 + if (!tps6598x_read_power_status(tps)) 1555 1553 goto err_unregister_port; 1556 - } 1557 1554 ret = tps6598x_connect(tps, status); 1558 1555 if (ret) 1559 1556 dev_err(&client->dev, "failed to register partner\n");