ChromeOS bot merged this change.
BACKPORT: usb: core: added uevent for over-current
After commit 1cbd53c8cd85 ("usb: core: introduce per-port over-current
counters") usb ports expose a sysfs value 'over_current_count'
to user space. This value on its own is not very useful as it requires
manual polling.
As a solution, fire a udev event from the usb hub device that specifies
the values 'OVER_CURRENT_PORT' and 'OVER_CURRENT_COUNT' that indicate
the path of the usb port where the over-current event occurred and the
value of 'over_current_count' in sysfs. Additionally, call
sysfs_notify() so the sysfs value supports poll().
Signed-off-by: Jon Flatley <jf...@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
(cherry picked from commit 201af55da8a3986297d7c3493f839dfc96ffd7db)
BUG=chromium:868424
TEST=None
Change-Id: Ia81c6955817f6c10903a5ffe55842093e582b8a6
Reviewed-on: https://chromium-review.googlesource.com/1308686
Commit-Ready: Jon Flatley <jf...@chromium.org>
Tested-by: Jon Flatley <jf...@chromium.org>
Reviewed-by: Benson Leung <ble...@chromium.org>
Reviewed-by: Dmitry Torokhov <dt...@chromium.org>
---
M Documentation/ABI/testing/sysfs-bus-usb
M drivers/usb/core/hub.c
2 files changed, 44 insertions(+), 1 deletion(-)
To view, visit change 1308686. To unsubscribe, or for help writing mail filters, visit settings.