Skip to content

Commit 6fb9e1d

Browse files
Linyu Yuangregkh
authored andcommitted
usb: typec: add missing uevent when partner support PD
System like Android allow user control power role from UI, it is possible to implement application base on typec uevent to refresh UI, but found there is chance that UI show different state from typec attribute file. In typec_set_pwr_opmode(), when partner support PD, there is no uevent send to user space which cause the problem. Fix it by sending uevent notification when change power mode to PD. Fixes: bdecb33 ("usb: typec: API for controlling USB Type-C Multiplexers") Cc: [email protected] Signed-off-by: Linyu Yuan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5812175 commit 6fb9e1d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/usb/typec/class.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,6 +1718,7 @@ void typec_set_pwr_opmode(struct typec_port *port,
17181718
partner->usb_pd = 1;
17191719
sysfs_notify(&partner_dev->kobj, NULL,
17201720
"supports_usb_power_delivery");
1721+
kobject_uevent(&partner_dev->kobj, KOBJ_CHANGE);
17211722
}
17221723
put_device(partner_dev);
17231724
}

0 commit comments

Comments
 (0)