Skip to content

Commit 7616f00

Browse files
msizanoen1gregkh
authored andcommitted
usb: typec: ucsi: Update power_supply on power role change
The current power direction of an USB-C port also influences the power_supply's online status, so a power role change should also update the power_supply. Fixes an issue on some systems where plugging in a normal USB device in for the first time after a reboot will cause upower to erroneously consider the system to be connected to AC power. Cc: stable <[email protected]> Fixes: 0e6371f ("usb: typec: ucsi: Report power supply changes") Signed-off-by: Myrrh Periwinkle <[email protected]> Reviewed-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent af833e7 commit 7616f00

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/usb/typec/ucsi/ucsi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,6 +1245,7 @@ static void ucsi_handle_connector_change(struct work_struct *work)
12451245

12461246
if (change & UCSI_CONSTAT_POWER_DIR_CHANGE) {
12471247
typec_set_pwr_role(con->port, role);
1248+
ucsi_port_psy_changed(con);
12481249

12491250
/* Complete pending power role swap */
12501251
if (!completion_done(&con->complete))

0 commit comments

Comments
 (0)