Re: [PATCH v2] usb: core: introduce per-port over-current counters

From: Richard Leitner
Date: Tue Mar 13 2018 - 06:30:54 EST


Hi Greg,

On 03/09/2018 06:19 PM, Greg KH wrote:
>> diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb
>> index 0bd731cbb50c..27020293c85b 100644
>> --- a/Documentation/ABI/testing/sysfs-bus-usb
>> +++ b/Documentation/ABI/testing/sysfs-bus-usb
>> @@ -189,6 +189,15 @@ Description:
>> The file will read "hotplug", "wired" and "not used" if the
>> information is available, and "unknown" otherwise.
>>
>> +What: /sys/bus/usb/devices/.../(hub interface)/portX/over_current_count
>> +Date: February 2018
>> +Contact: Richard Leitner <richard.leitner@xxxxxxxxxxx>
>> +Description:
>> + Most hubs are able to detect over-current situations on their
>> + ports and report them to the kernel. This attribute is to expose
>> + the number of over-current situation occurred on a specific port
>> + to user space. This file will contain an unsigned int.
> "unsigned int" is very vague :)
>
> How about "this is a 32bit value"?
>
> And what happens when this wraps? Is that allowed?

Thank you for your feedback. I'll improve the description for v3!

>
> thanks,
>
> greg k-h

regards;Richard.L