diff mbox series

dt-bindings: usb: qcom,dwc3: set minItems for interrupt-names

Message ID 20240527144538.155704-1-brgl@bgdev.pl
State New
Headers show
Series dt-bindings: usb: qcom,dwc3: set minItems for interrupt-names | expand

Commit Message

Bartosz Golaszewski May 27, 2024, 2:45 p.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

There's a set of compatibles for which we set a strict list of 5 interrupt
names even though minItems for the interrupts property is 4. One of the
USB controllers on sa8775p only consumes 4 interrupts which leads to
dtbs_check errors. Make the last entry optional by setting minItems to 4.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 1 +
 1 file changed, 1 insertion(+)

Comments

Bartosz Golaszewski June 4, 2024, 6:52 a.m. UTC | #1
On Mon, May 27, 2024 at 4:45 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> There's a set of compatibles for which we set a strict list of 5 interrupt
> names even though minItems for the interrupts property is 4. One of the
> USB controllers on sa8775p only consumes 4 interrupts which leads to
> dtbs_check errors. Make the last entry optional by setting minItems to 4.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
>  Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> index cf633d488c3f..4251dc25ee9a 100644
> --- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> +++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> @@ -468,6 +468,7 @@ allOf:
>            minItems: 4
>            maxItems: 5
>          interrupt-names:
> +          minItems: 4
>            items:
>              - const: pwr_event
>              - const: hs_phy_irq
> --
> 2.43.0
>

Gentle ping.

Bart
Johan Hovold June 4, 2024, 10:51 a.m. UTC | #2
On Mon, May 27, 2024 at 05:13:39PM +0200, Krzysztof Kozlowski wrote:
> On 27/05/2024 16:45, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > 
> > There's a set of compatibles for which we set a strict list of 5 interrupt
> > names even though minItems for the interrupts property is 4. One of the
> > USB controllers on sa8775p only consumes 4 interrupts which leads to
> > dtbs_check errors. Make the last entry optional by setting minItems to 4.
> > 
> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > ---
> >  Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 1 +
> >  1 file changed, 1 insertion(+)
> 
> Can you also fix other cases? I found there at least two other. I missed
> that during review... or maybe we discussed it? I remember that commit
> was a pain :/

Yes, please make sure to fix those two remaining instances at the same
time.
 
> But be sure that this is what we actually want. Maybe intention was to
> have fixed number of interrupts (so no minItems in interrupts)?

I'm pretty sure the intention was to keep the SuperSpeed interrupts
optional.

Johan
Johan Hovold June 4, 2024, 10:52 a.m. UTC | #3
On Tue, Jun 04, 2024 at 08:52:52AM +0200, Bartosz Golaszewski wrote:
> On Mon, May 27, 2024 at 4:45 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> >
> > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >
> > There's a set of compatibles for which we set a strict list of 5 interrupt
> > names even though minItems for the interrupts property is 4. One of the
> > USB controllers on sa8775p only consumes 4 interrupts which leads to
> > dtbs_check errors. Make the last entry optional by setting minItems to 4.
> >
> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > ---
> >  Documentation/devicetree/bindings/usb/qcom,dwc3.yaml | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> > index cf633d488c3f..4251dc25ee9a 100644
> > --- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> > +++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
> > @@ -468,6 +468,7 @@ allOf:
> >            minItems: 4
> >            maxItems: 5
> >          interrupt-names:
> > +          minItems: 4
> >            items:
> >              - const: pwr_event
> >              - const: hs_phy_irq
> > --
> > 2.43.0
> >
> 
> Gentle ping.

As was pointed out elsewhere in this thread, there are two more
issues like introduced by the same patch which should be fixed at the
same time.

Johan
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
index cf633d488c3f..4251dc25ee9a 100644
--- a/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,dwc3.yaml
@@ -468,6 +468,7 @@  allOf:
           minItems: 4
           maxItems: 5
         interrupt-names:
+          minItems: 4
           items:
             - const: pwr_event
             - const: hs_phy_irq