Re: Re: [PATCH v13 2/5] dt-bindings: pwm: dwc: Add eswin compatible

"Xuyang Dong" <[email protected]>
Newsgroups dev.linux.lists.sashiko-reviews,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pwm
Message-ID <[email protected]>
> 
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] Strict positional constraint on independent optional resets prevents using only the second reset ('timer').
> --
> 
> --- Patch [2]: [PATCH v13 2/5] dt-bindings: pwm: dwc: Add eswin compatible ---
> commit 5ab967af16c3b9f7a1cfa80ab82369dd37f82452
> Author: Xuyang Dong <[email protected]>
> 
> dt-bindings: pwm: dwc: Add eswin compatible
> 
> This commit adds the eswin,eic7700-pwm compatible string to the DesignWare 
> PWM IP binding. It constrains the resets property for this specific hardware 
> variant to exactly one combined reset line, and modifies the base reset 
> properties to require at least one reset.
> 
> > diff --git a/Documentation/devicetree/bindings/pwm/snps,dw-apb-timers-pwm2.yaml b/Documentation/devicetree/bindings/pwm/snps,dw-apb-timers-pwm2.yaml
> > index 1f9d72f9f3590..c65174e2045a7 100644
> > --- a/Documentation/devicetree/bindings/pwm/snps,dw-apb-timers-pwm2.yaml
> > +++ b/Documentation/devicetree/bindings/pwm/snps,dw-apb-timers-pwm2.yaml
> [ ... ]
> > @@ -44,11 +43,13 @@ properties:
> >        - const: timer
> >  
> >    resets:
> > +    minItems: 1
> >      items:
> >        - description: Interface bus (presetn) reset
> >        - description: PWM timer logic (timer_N_resetn) reset
> >  
> >    reset-names:
> > +    minItems: 1
> >      items:
> >        - const: bus
> >        - const: timer
> 
> [Severity: Medium]
> Does this strict positional constraint on reset-names prevent a generic
> device from using only the second reset?
> 
> The generic compatible allows up to two independent resets, meaning any
> combination should be valid. However, if a platform wires only the
> independent timer reset and provides a single element array with just
> "timer", the dt-schema validates it sequentially against the items list.
> Because it expects the first position to be "bus", providing just the
> timer reset will result in a validation error for an otherwise valid
> hardware configuration.
> 

Hi Sashiko,

Drop minItems of reset-names in the next version.

Best regards,
Xuyang Dong

> -- 
> Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.