diff options
author | Prashant Malani <pmalani@chromium.org> | 2021-01-07 04:49:04 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-01-07 14:22:22 +0100 |
commit | 6c75c2bad36cfb43b144e6a0a76a69993c72097f (patch) | |
tree | 16e1e31727d1bfcf56370e99a057d39dae46f6d1 /drivers/usb | |
parent | usb: typec: Fix copy paste error for NVIDIA alt-mode description (diff) | |
download | linux-6c75c2bad36cfb43b144e6a0a76a69993c72097f.tar.xz linux-6c75c2bad36cfb43b144e6a0a76a69993c72097f.zip |
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 <heikki.krogerus@linux.intel.com>
Cc: Benson Leung <bleung@chromium.org>
Signed-off-by: Prashant Malani <pmalani@chromium.org>
Link: https://lore.kernel.org/r/20210107034904.4112029-1-pmalani@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/typec/class.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c index ebfd3113a9a8..8f77669f9cf4 100644 --- a/drivers/usb/typec/class.c +++ b/drivers/usb/typec/class.c @@ -766,6 +766,7 @@ int typec_partner_set_num_altmodes(struct typec_partner *partner, int num_altmod return ret; sysfs_notify(&partner->dev.kobj, NULL, "number_of_alternate_modes"); + kobject_uevent(&partner->dev.kobj, KOBJ_CHANGE); return 0; } @@ -923,6 +924,7 @@ int typec_plug_set_num_altmodes(struct typec_plug *plug, int num_altmodes) return ret; sysfs_notify(&plug->dev.kobj, NULL, "number_of_alternate_modes"); + kobject_uevent(&plug->dev.kobj, KOBJ_CHANGE); return 0; } |