Skip to contentSkip to conversation

usb: core: added uevent for over-current

PATCH Superseded Greg Kroah-Hartman 1 participant 1 message Sep 20, 2018 USB

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

PATCH v2 1/1 usb: core: added uevent for over-current

Quoted 11 lines · Jon Flatley

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().

Quoted 5 lines
---
 Documentation/ABI/testing/sysfs-bus-usb |  9 ++++++-
 drivers/usb/core/hub.c                  | 36 +++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 1 deletion(-)

This patch doesn't apply against my usb-next branch at the moment.

Can you rebase it and resend?

thanks,

greg k-h