diff mbox series

[14/18] dt-bindings: usb: dwc3: Add Frame Length Adj restrictions

Message ID 20201010224121.12672-15-Sergey.Semin@baikalelectronics.ru
State Changes Requested
Headers show
Series dt-bindings: usb: Add generic USB HCD, xHCI, DWC USB3 DT schema | expand

Checks

Context Check Description
robh/checkpatch success

Commit Message

Serge Semin Oct. 10, 2020, 10:41 p.m. UTC
In accordance with the IP core databook the
snps,quirk-frame-length-adjustment property can be set within [0, 0x3F].
Let's make sure the DT schema applies a correct restriction on the
property.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
---
 Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 2 ++
 1 file changed, 2 insertions(+)

Comments

Rob Herring Oct. 13, 2020, 12:38 p.m. UTC | #1
On Sun, Oct 11, 2020 at 01:41:17AM +0300, Serge Semin wrote:
> In accordance with the IP core databook the
> snps,quirk-frame-length-adjustment property can be set within [0, 0x3F].
> Let's make sure the DT schema applies a correct restriction on the
> property.
> 
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> ---
>  Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
> index 36d4b8060d7c..f1e6c3dab1ff 100644
> --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
> +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
> @@ -226,6 +226,8 @@ properties:
>        length adjustment when the fladj_30mhz_sdbnd signal is invalid or
>        incorrect.
>      $ref: /schemas/types.yaml#/definitions/uint32
> +    minimum: 0
> +    maximum: 0x3f

It's fine if you add the constraints during the conversion.

>  
>    snps,rx-thr-num-pkt-prd:
>      description: |
> -- 
> 2.27.0
>
Serge Semin Oct. 13, 2020, 3:45 p.m. UTC | #2
On Tue, Oct 13, 2020 at 07:38:59AM -0500, Rob Herring wrote:
> On Sun, Oct 11, 2020 at 01:41:17AM +0300, Serge Semin wrote:
> > In accordance with the IP core databook the
> > snps,quirk-frame-length-adjustment property can be set within [0, 0x3F].
> > Let's make sure the DT schema applies a correct restriction on the
> > property.
> > 
> > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> > ---
> >  Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
> > index 36d4b8060d7c..f1e6c3dab1ff 100644
> > --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
> > +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
> > @@ -226,6 +226,8 @@ properties:
> >        length adjustment when the fladj_30mhz_sdbnd signal is invalid or
> >        incorrect.
> >      $ref: /schemas/types.yaml#/definitions/uint32
> > +    minimum: 0
> > +    maximum: 0x3f
> 

> It's fine if you add the constraints during the conversion.

Ok. I'll keep it in mind next time.)

-Sergey

> 
> >  
> >    snps,rx-thr-num-pkt-prd:
> >      description: |
> > -- 
> > 2.27.0
> >
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
index 36d4b8060d7c..f1e6c3dab1ff 100644
--- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
@@ -226,6 +226,8 @@  properties:
       length adjustment when the fladj_30mhz_sdbnd signal is invalid or
       incorrect.
     $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 0
+    maximum: 0x3f
 
   snps,rx-thr-num-pkt-prd:
     description: |