diff mbox series

[v0,1/2] dt-bindings: usb: qcom,dwc3: Add minItems for interrupt info

Message ID 20240711065615.2720367-1-quic_varada@quicinc.com (mailing list archive)
State Not Applicable
Headers show
Series [v0,1/2] dt-bindings: usb: qcom,dwc3: Add minItems for interrupt info | expand

Commit Message

Varadarajan Narayanan July 11, 2024, 6:56 a.m. UTC
IPQ5332 has only three interrupts. Update min items
accordingly for interrupt names to fix the following
dt_binding_check errors.

	interrupt-names: ['pwr_event', 'dp_hs_phy_irq', 'dm_hs_phy_irq'] is too short

Fixes: a5c7592366af ("dt-bindings: usb: qcom,dwc3: add SC8280XP binding")
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
 Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 3 +++
 1 file changed, 3 insertions(+)

Comments

Krzysztof Kozlowski July 11, 2024, 7:47 a.m. UTC | #1
On 11/07/2024 08:56, Varadarajan Narayanan wrote:
> IPQ5332 has only three interrupts. Update min items
> accordingly for interrupt names to fix the following
> dt_binding_check errors.
> 
> 	interrupt-names: ['pwr_event', 'dp_hs_phy_irq', 'dm_hs_phy_irq'] is too short
> 
> Fixes: a5c7592366af ("dt-bindings: usb: qcom,dwc3: add SC8280XP binding")

There is no ipq5332 at this commit, so I do not understand which bug are
you fixing.

> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
> ---
>  Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> index efde47a5b145..283bac1efba9 100644
> --- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> +++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> @@ -432,8 +432,11 @@ allOf:
>      then:
>        properties:
>          interrupts:
> +          minItems: 3
>            maxItems: 4
>          interrupt-names:
> +          minItems: 3
> +          maxItems: 4

but x1e80100 has 4, right?

>            items:
>              - const: pwr_event
>              - const: dp_hs_phy_irq

Best regards,
Krzysztof
Rob Herring (Arm) July 11, 2024, 8:31 a.m. UTC | #2
On Thu, 11 Jul 2024 12:26:14 +0530, Varadarajan Narayanan wrote:
> IPQ5332 has only three interrupts. Update min items
> accordingly for interrupt names to fix the following
> dt_binding_check errors.
> 
> 	interrupt-names: ['pwr_event', 'dp_hs_phy_irq', 'dm_hs_phy_irq'] is too short
> 
> Fixes: a5c7592366af ("dt-bindings: usb: qcom,dwc3: add SC8280XP binding")
> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
> ---
>  Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml: allOf:12:then:properties:interrupt-names: {'minItems': 3, 'maxItems': 4, 'items': [{'const': 'pwr_event'}, {'const': 'dp_hs_phy_irq'}, {'const': 'dm_hs_phy_irq'}, {'const': 'ss_phy_irq'}]} should not be valid under {'required': ['maxItems']}
	hint: "maxItems" is not needed with an "items" list
	from schema $id: http://devicetree.org/meta-schemas/items.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240711065615.2720367-1-quic_varada@quicinc.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
Varadarajan Narayanan July 11, 2024, 8:47 a.m. UTC | #3
On Thu, Jul 11, 2024 at 09:47:23AM +0200, Krzysztof Kozlowski wrote:
> On 11/07/2024 08:56, Varadarajan Narayanan wrote:
> > IPQ5332 has only three interrupts. Update min items
> > accordingly for interrupt names to fix the following
> > dt_binding_check errors.
> >
> > 	interrupt-names: ['pwr_event', 'dp_hs_phy_irq', 'dm_hs_phy_irq'] is too short
> >
> > Fixes: a5c7592366af ("dt-bindings: usb: qcom,dwc3: add SC8280XP binding")
>
> There is no ipq5332 at this commit, so I do not understand which bug are
> you fixing.

a5c7592366af introduced this interrupt and interrupt-names block. Later, 53c6d854be4e9 added ipq5332 to this section. Since a5c7592366af introduced the maxItems and I wanted to include minItems also (to accomodate ipq5332) I used a5c7592366af in the fixes tag. Will 53c6d854be4e9 be a more appropriate choice?

> > Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
> > ---
> >  Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> > index efde47a5b145..283bac1efba9 100644
> > --- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> > +++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> > @@ -432,8 +432,11 @@ allOf:
> >      then:
> >        properties:
> >          interrupts:
> > +          minItems: 3
> >            maxItems: 4
> >          interrupt-names:
> > +          minItems: 3
> > +          maxItems: 4
>
> but x1e80100 has 4, right?

Yes. Will have a separate block for ipq5332. Went with min/max based
on one of the previous blocks that had min/max as two and three for
a group of SoCs.


Thanks
Varada

> >            items:
> >              - const: pwr_event
> >              - const: dp_hs_phy_irq
>
> Best regards,
> Krzysztof
Krzysztof Kozlowski July 11, 2024, 9:03 a.m. UTC | #4
On 11/07/2024 10:47, Varadarajan Narayanan wrote:
> On Thu, Jul 11, 2024 at 09:47:23AM +0200, Krzysztof Kozlowski wrote:
>> On 11/07/2024 08:56, Varadarajan Narayanan wrote:
>>> IPQ5332 has only three interrupts. Update min items
>>> accordingly for interrupt names to fix the following
>>> dt_binding_check errors.
>>>
>>> 	interrupt-names: ['pwr_event', 'dp_hs_phy_irq', 'dm_hs_phy_irq'] is too short
>>>
>>> Fixes: a5c7592366af ("dt-bindings: usb: qcom,dwc3: add SC8280XP binding")
>>
>> There is no ipq5332 at this commit, so I do not understand which bug are
>> you fixing.
> 
> a5c7592366af introduced this interrupt and interrupt-names block. Later, 53c6d854be4e9 added ipq5332 to this section. Since a5c7592366af introduced the maxItems and I wanted to include minItems also (to accomodate ipq5332) I used a5c7592366af in the fixes tag. Will 53c6d854be4e9 be a more appropriate choice?

At least a5c7592366af cannot be, because there is no bug in
a5c7592366af. Otherwise please explain what bug is present at time of
a5c7592366af?


Best regards,
Krzysztof
Krzysztof Kozlowski July 11, 2024, 9:03 a.m. UTC | #5
On 11/07/2024 10:47, Varadarajan Narayanan wrote:
>>
>> but x1e80100 has 4, right?
> 
> Yes. Will have a separate block for ipq5332. Went with min/max based
> on one of the previous blocks that had min/max as two and three for
> a group of SoCs.
> 

Did you even test it before sending?

Best regards,
Krzysztof
Varadarajan Narayanan July 11, 2024, 9:28 a.m. UTC | #6
On Thu, Jul 11, 2024 at 11:03:56AM +0200, Krzysztof Kozlowski wrote:
> On 11/07/2024 10:47, Varadarajan Narayanan wrote:
> >>
> >> but x1e80100 has 4, right?
> >
> > Yes. Will have a separate block for ipq5332. Went with min/max based
> > on one of the previous blocks that had min/max as two and three for
> > a group of SoCs.
> >
>
> Did you even test it before sending?

Yes, ran dt_binding_check. After confirming that ipq5332 related
errors got resolved and no new errors for x1e80100 sent the
patch. Missed the yaml file related error generated by Rob's bot.

Will address these and send a new patch.

Thanks
Varada
Rob Herring (Arm) July 11, 2024, 2:22 p.m. UTC | #7
On Thu, Jul 11, 2024 at 12:26:14PM +0530, Varadarajan Narayanan wrote:
> IPQ5332 has only three interrupts. Update min items
> accordingly for interrupt names to fix the following
> dt_binding_check errors.

Patch version numbering starts at 1, not 0.

Rob
Varadarajan Narayanan July 17, 2024, 9:51 a.m. UTC | #8
On Thu, Jul 11, 2024 at 08:22:02AM -0600, Rob Herring wrote:
> On Thu, Jul 11, 2024 at 12:26:14PM +0530, Varadarajan Narayanan wrote:
> > IPQ5332 has only three interrupts. Update min items
> > accordingly for interrupt names to fix the following
> > dt_binding_check errors.
>
> Patch version numbering starts at 1, not 0.

Sorry. Have posted v2 addressing the above and other
comments. Please take a look.

Thanks
Varada
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
index efde47a5b145..283bac1efba9 100644
--- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
@@ -432,8 +432,11 @@  allOf:
     then:
       properties:
         interrupts:
+          minItems: 3
           maxItems: 4
         interrupt-names:
+          minItems: 3
+          maxItems: 4
           items:
             - const: pwr_event
             - const: dp_hs_phy_irq