]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: typec: ucsi: Update power_supply on power role change
authorMyrrh Periwinkle <myrrhperiwinkle@qtmlabs.xyz>
Mon, 21 Jul 2025 06:32:51 +0000 (13:32 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:26:03 +0000 (16:26 +0200)
commit7535a2664b8a36a077addf8ca2be55fab6adc745
treed4234dc60993c08c62f6a056b289a1d29c43a7e3
parentfe4cf0f7c95280030b18d130e85cf0170481b3fd
usb: typec: ucsi: Update power_supply on power role change

commit 7616f006db07017ef5d4ae410fca99279aaca7aa upstream.

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 <stable@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>
Link: https://lore.kernel.org/r/20250721-fix-ucsi-pwr-dir-notify-v1-1-e53d5340cb38@qtmlabs.xyz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi.c