diff mbox series

[1/2] dt-bindings: usb: generic-ehci: document ignore-oc flag

Message ID 20210223155005.21712-2-noltari@gmail.com (mailing list archive)
State New, archived
Headers show
Series usb: host: ehci-platform: add ignore-oc DT support | expand

Commit Message

Álvaro Fernández Rojas Feb. 23, 2021, 3:50 p.m. UTC
Over-current reporting isn't supported on some platforms such as bcm63xx.
These devices will incorrectly report over-current if this flag isn't properly
activated.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 Documentation/devicetree/bindings/usb/generic-ehci.yaml | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Alan Stern Feb. 23, 2021, 3:54 p.m. UTC | #1
On Tue, Feb 23, 2021 at 04:50:04PM +0100, Álvaro Fernández Rojas wrote:
> Over-current reporting isn't supported on some platforms such as bcm63xx.
> These devices will incorrectly report over-current if this flag isn't properly
> activated.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> ---
>  Documentation/devicetree/bindings/usb/generic-ehci.yaml | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/generic-ehci.yaml b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
> index cf83f2d9afac..294bbf02399e 100644
> --- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml
> +++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
> @@ -117,6 +117,11 @@ properties:
>        Set this flag if EHCI has a Transaction Translator built into
>        the root hub.
>  
> +  ignore-oc:
> +    $ref: /schemas/types.yaml#/definitions/flag
> +    description:
> +      Set this flag for HCDs without over-current reporting support.

This is not a good description of a device property.  DT entries are 
supposed to described the hardware, not talk about how to use it.

When you say that the bcm63xx doesn't support over-current reporting, 
what exactly do you mean?  Do you mean that sometimes the hardware turns 
on the over-current bit when an over-current isn't actually present?  Or 
do you mean something else?

Alan Stern

> +
>    needs-reset-on-resume:
>      $ref: /schemas/types.yaml#/definitions/flag
>      description:
> -- 
> 2.20.1
>
Álvaro Fernández Rojas Feb. 23, 2021, 4:04 p.m. UTC | #2
Hi Alan,

> El 23 feb 2021, a las 16:54, Alan Stern <stern@rowland.harvard.edu> escribió:
> 
> On Tue, Feb 23, 2021 at 04:50:04PM +0100, Álvaro Fernández Rojas wrote:
>> Over-current reporting isn't supported on some platforms such as bcm63xx.
>> These devices will incorrectly report over-current if this flag isn't properly
>> activated.
>> 
>> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
>> ---
>> Documentation/devicetree/bindings/usb/generic-ehci.yaml | 5 +++++
>> 1 file changed, 5 insertions(+)
>> 
>> diff --git a/Documentation/devicetree/bindings/usb/generic-ehci.yaml b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
>> index cf83f2d9afac..294bbf02399e 100644
>> --- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml
>> +++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
>> @@ -117,6 +117,11 @@ properties:
>>       Set this flag if EHCI has a Transaction Translator built into
>>       the root hub.
>> 
>> +  ignore-oc:
>> +    $ref: /schemas/types.yaml#/definitions/flag
>> +    description:
>> +      Set this flag for HCDs without over-current reporting support.
> 
> This is not a good description of a device property.  DT entries are 
> supposed to described the hardware, not talk about how to use it.

Any suggestions on a proper description?

> 
> When you say that the bcm63xx doesn't support over-current reporting, 
> what exactly do you mean?  Do you mean that sometimes the hardware turns 
> on the over-current bit when an over-current isn't actually present?  Or 
> do you mean something else?

Yes, the hardware turns on the over-current bit with no over-current present.

> 
> Alan Stern
> 
>> +
>>   needs-reset-on-resume:
>>     $ref: /schemas/types.yaml#/definitions/flag
>>     description:
>> -- 
>> 2.20.1

Best regards,
Álvaro.
Alan Stern Feb. 23, 2021, 4:09 p.m. UTC | #3
On Tue, Feb 23, 2021 at 05:04:57PM +0100, Álvaro Fernández Rojas wrote:
> Hi Alan,
> 
> > El 23 feb 2021, a las 16:54, Alan Stern <stern@rowland.harvard.edu> escribió:
> > 
> > On Tue, Feb 23, 2021 at 04:50:04PM +0100, Álvaro Fernández Rojas wrote:
> >> Over-current reporting isn't supported on some platforms such as bcm63xx.
> >> These devices will incorrectly report over-current if this flag isn't properly
> >> activated.
> >> 
> >> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> >> ---
> >> Documentation/devicetree/bindings/usb/generic-ehci.yaml | 5 +++++
> >> 1 file changed, 5 insertions(+)
> >> 
> >> diff --git a/Documentation/devicetree/bindings/usb/generic-ehci.yaml b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
> >> index cf83f2d9afac..294bbf02399e 100644
> >> --- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml
> >> +++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
> >> @@ -117,6 +117,11 @@ properties:
> >>       Set this flag if EHCI has a Transaction Translator built into
> >>       the root hub.
> >> 
> >> +  ignore-oc:
> >> +    $ref: /schemas/types.yaml#/definitions/flag
> >> +    description:
> >> +      Set this flag for HCDs without over-current reporting support.
> > 
> > This is not a good description of a device property.  DT entries are 
> > supposed to described the hardware, not talk about how to use it.
> 
> Any suggestions on a proper description?
> 
> > 
> > When you say that the bcm63xx doesn't support over-current reporting, 
> > what exactly do you mean?  Do you mean that sometimes the hardware turns 
> > on the over-current bit when an over-current isn't actually present?  Or 
> > do you mean something else?
> 
> Yes, the hardware turns on the over-current bit with no over-current present.

Okay, in that case the property should be named something like 
"spurious_oc", and the description should say something like:

	Set this flag to indicate that the hardware sometimes turns on 
	the OC bit when an over-current isn't actually present.

Alan Stern
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/generic-ehci.yaml b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
index cf83f2d9afac..294bbf02399e 100644
--- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml
+++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
@@ -117,6 +117,11 @@  properties:
       Set this flag if EHCI has a Transaction Translator built into
       the root hub.
 
+  ignore-oc:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      Set this flag for HCDs without over-current reporting support.
+
   needs-reset-on-resume:
     $ref: /schemas/types.yaml#/definitions/flag
     description: