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: ucsi: Report power supply changes on power opmode changes

Report opmode changes from the PPM to the power supply class by calling
ucsi_port_psy_changed(). If the current opmode is USB PD, do not call
ucsi_port_psy_changed(). The power supply class will be updated after
requesting partner source PDOs.

Signed-off-by: Jameson Thies <jthies@google.com>
Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-By: Kenneth R. Crudup <kenny@panix.com>
Link: https://patch.msgid.link/20251016235909.2092917-3-jthies@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jameson Thies and committed by
Greg Kroah-Hartman
e397f446 ef7204a9

+3
+3
drivers/usb/typec/ucsi/ucsi.c
··· 1022 1022 case UCSI_CONSTAT_PWR_OPMODE_TYPEC1_5: 1023 1023 con->rdo = 0; 1024 1024 typec_set_pwr_opmode(con->port, TYPEC_PWR_MODE_1_5A); 1025 + ucsi_port_psy_changed(con); 1025 1026 break; 1026 1027 case UCSI_CONSTAT_PWR_OPMODE_TYPEC3_0: 1027 1028 con->rdo = 0; 1028 1029 typec_set_pwr_opmode(con->port, TYPEC_PWR_MODE_3_0A); 1030 + ucsi_port_psy_changed(con); 1029 1031 break; 1030 1032 default: 1031 1033 con->rdo = 0; 1032 1034 typec_set_pwr_opmode(con->port, TYPEC_PWR_MODE_USB); 1035 + ucsi_port_psy_changed(con); 1033 1036 break; 1034 1037 } 1035 1038 }