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: Update partner identity when power status was updated

Whenever the power status is changed make sure to also update the
partner identity to be able to detect changes once de-bouncing and mode
changes are added for CD321x.

Signed-off-by: Hector Martin <marcan@marcan.st>
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-8-4e99c8649024@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Hector Martin and committed by
Greg Kroah-Hartman
36c791c1 7b1d3185

+8 -1
+8 -1
drivers/usb/typec/tipd/core.c
··· 635 635 if (!tps6598x_read_status(tps, &status)) 636 636 goto err_unlock; 637 637 638 - if (event & APPLE_CD_REG_INT_POWER_STATUS_UPDATE) 638 + if (event & APPLE_CD_REG_INT_POWER_STATUS_UPDATE) { 639 639 if (!tps6598x_read_power_status(tps)) 640 640 goto err_unlock; 641 + if (TPS_POWER_STATUS_PWROPMODE(tps->pwr_status) == TYPEC_PWR_MODE_PD) { 642 + if (tps6598x_read_partner_identity(tps)) { 643 + dev_err(tps->dev, "failed to read partner identity\n"); 644 + tps->partner_identity = (struct usb_pd_identity) {0}; 645 + } 646 + } 647 + } 641 648 642 649 if (event & APPLE_CD_REG_INT_DATA_STATUS_UPDATE) 643 650 if (!tps->data->read_data_status(tps))