drivers/usb/typec/ucsi/ucsi.c | 1 + 1 file changed, 1 insertion(+)
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@vger.kernel.org
Fixes: 0e6371fbfba3 ("usb: typec: ucsi: Report power supply changes")
Signed-off-by: Myrrh Periwinkle <myrrhperiwinkle@qtmlabs.xyz>
---
drivers/usb/typec/ucsi/ucsi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index 01ce858a1a2b3466155db340e213c767d1e79479..8ff31963970bb384e28b460e5307e32cf421396b 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -1246,6 +1246,7 @@ static void ucsi_handle_connector_change(struct work_struct *work)
if (change & UCSI_CONSTAT_POWER_DIR_CHANGE) {
typec_set_pwr_role(con->port, role);
+ ucsi_port_psy_changed(con);
/* Complete pending power role swap */
if (!completion_done(&con->complete))
---
base-commit: 89be9a83ccf1f88522317ce02f854f30d6115c41
change-id: 20250721-fix-ucsi-pwr-dir-notify-8a953aab42e5
Best regards,
--
Myrrh Periwinkle <myrrhperiwinkle@qtmlabs.xyz>
On Mon, Jul 21, 2025 at 01:32:51PM +0700, Myrrh Periwinkle wrote:
> 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@vger.kernel.org
> Fixes: 0e6371fbfba3 ("usb: typec: ucsi: Report power supply changes")
> Signed-off-by: Myrrh Periwinkle <myrrhperiwinkle@qtmlabs.xyz>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/ucsi/ucsi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
> index 01ce858a1a2b3466155db340e213c767d1e79479..8ff31963970bb384e28b460e5307e32cf421396b 100644
> --- a/drivers/usb/typec/ucsi/ucsi.c
> +++ b/drivers/usb/typec/ucsi/ucsi.c
> @@ -1246,6 +1246,7 @@ static void ucsi_handle_connector_change(struct work_struct *work)
>
> if (change & UCSI_CONSTAT_POWER_DIR_CHANGE) {
> typec_set_pwr_role(con->port, role);
> + ucsi_port_psy_changed(con);
>
> /* Complete pending power role swap */
> if (!completion_done(&con->complete))
>
> ---
> base-commit: 89be9a83ccf1f88522317ce02f854f30d6115c41
> change-id: 20250721-fix-ucsi-pwr-dir-notify-8a953aab42e5
>
> Best regards,
> --
> Myrrh Periwinkle <myrrhperiwinkle@qtmlabs.xyz>
--
heikki
© 2016 - 2026 Red Hat, Inc.