Skip to content

Commit 6c75c2b

Browse files
Prashant Malanigregkh
authored andcommitted
usb: typec: Send uevent for num_altmodes update
Generate a change uevent when the "number_of_alternate_modes" sysfs file for partners and plugs is updated by a port driver. Cc: Heikki Krogerus <[email protected]> Cc: Benson Leung <[email protected]> Signed-off-by: Prashant Malani <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 41952a6 commit 6c75c2b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/usb/typec/class.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,7 @@ int typec_partner_set_num_altmodes(struct typec_partner *partner, int num_altmod
766766
return ret;
767767

768768
sysfs_notify(&partner->dev.kobj, NULL, "number_of_alternate_modes");
769+
kobject_uevent(&partner->dev.kobj, KOBJ_CHANGE);
769770

770771
return 0;
771772
}
@@ -923,6 +924,7 @@ int typec_plug_set_num_altmodes(struct typec_plug *plug, int num_altmodes)
923924
return ret;
924925

925926
sysfs_notify(&plug->dev.kobj, NULL, "number_of_alternate_modes");
927+
kobject_uevent(&plug->dev.kobj, KOBJ_CHANGE);
926928

927929
return 0;
928930
}

0 commit comments

Comments
 (0)