diff mbox series

dt-bindings: dmaengine: qcom: gpi: Add minItems for interrupts

Message ID 20220414064235.1182195-1-vkoul@kernel.org (mailing list archive)
State Not Applicable
Headers show
Series dt-bindings: dmaengine: qcom: gpi: Add minItems for interrupts | expand

Commit Message

Vinod Koul April 14, 2022, 6:42 a.m. UTC
Add the minItems for interrupts property as well. In the absence of
this, we get warning if interrupts are less than 13

arch/arm64/boot/dts/qcom/qrb5165-rb5.dtb:
dma-controller@800000: interrupts: [[0, 588, 4], [0, 589, 4], [0, 590,
4], [0, 591, 4], [0, 592, 4], [0, 593, 4], [0, 594, 4], [0, 595, 4], [0,
  596, 4], [0, 597, 4]] is too short

Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
 Documentation/devicetree/bindings/dma/qcom,gpi.yaml | 1 +
 1 file changed, 1 insertion(+)

Comments

Krzysztof Kozlowski April 14, 2022, 7:36 a.m. UTC | #1
On 14/04/2022 08:42, Vinod Koul wrote:
> Add the minItems for interrupts property as well. In the absence of
> this, we get warning if interrupts are less than 13
> 
> arch/arm64/boot/dts/qcom/qrb5165-rb5.dtb:
> dma-controller@800000: interrupts: [[0, 588, 4], [0, 589, 4], [0, 590,
> 4], [0, 591, 4], [0, 592, 4], [0, 593, 4], [0, 594, 4], [0, 595, 4], [0,
>   596, 4], [0, 597, 4]] is too short
> 
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> ---
>  Documentation/devicetree/bindings/dma/qcom,gpi.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/dma/qcom,gpi.yaml b/Documentation/devicetree/bindings/dma/qcom,gpi.yaml
> index 8a790ffbdaac..7d2fc4eb5530 100644
> --- a/Documentation/devicetree/bindings/dma/qcom,gpi.yaml
> +++ b/Documentation/devicetree/bindings/dma/qcom,gpi.yaml
> @@ -32,6 +32,7 @@ properties:
>    interrupts:
>      description:
>        Interrupt lines for each GPI instance
> +    minItems: 1

This should be some real case minimum, not just 1. Unless really only
one interrupt is also possible in existing variations?


Best regards,
Krzysztof
Vinod Koul April 14, 2022, 10:25 a.m. UTC | #2
On 14-04-22, 09:36, Krzysztof Kozlowski wrote:
> On 14/04/2022 08:42, Vinod Koul wrote:
> > Add the minItems for interrupts property as well. In the absence of
> > this, we get warning if interrupts are less than 13
> > 
> > arch/arm64/boot/dts/qcom/qrb5165-rb5.dtb:
> > dma-controller@800000: interrupts: [[0, 588, 4], [0, 589, 4], [0, 590,
> > 4], [0, 591, 4], [0, 592, 4], [0, 593, 4], [0, 594, 4], [0, 595, 4], [0,
> >   596, 4], [0, 597, 4]] is too short
> > 
> > Signed-off-by: Vinod Koul <vkoul@kernel.org>
> > ---
> >  Documentation/devicetree/bindings/dma/qcom,gpi.yaml | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/dma/qcom,gpi.yaml b/Documentation/devicetree/bindings/dma/qcom,gpi.yaml
> > index 8a790ffbdaac..7d2fc4eb5530 100644
> > --- a/Documentation/devicetree/bindings/dma/qcom,gpi.yaml
> > +++ b/Documentation/devicetree/bindings/dma/qcom,gpi.yaml
> > @@ -32,6 +32,7 @@ properties:
> >    interrupts:
> >      description:
> >        Interrupt lines for each GPI instance
> > +    minItems: 1
> 
> This should be some real case minimum, not just 1. Unless really only
> one interrupt is also possible in existing variations?

So that depends on the channels available to use which can be worst case
of 1. Maximum is 13.. Most of the controllers are between 12-13, but we
dont want to change binding in future if controller has lesser channels
right?
Krzysztof Kozlowski April 14, 2022, 11:44 a.m. UTC | #3
On 14/04/2022 12:25, Vinod Koul wrote:
>>>        Interrupt lines for each GPI instance
>>> +    minItems: 1
>>
>> This should be some real case minimum, not just 1. Unless really only
>> one interrupt is also possible in existing variations?
> 
> So that depends on the channels available to use which can be worst case
> of 1. Maximum is 13.. Most of the controllers are between 12-13, but we
> dont want to change binding in future if controller has lesser channels
> right?

If the choice is per SoC-controller, then the best would be to limit in
allOf:if:then. However maybe the number of channels depends also on
other factor (e.g. secure world configuration)?


Best regards,
Krzysztof
Vinod Koul April 20, 2022, 10:36 a.m. UTC | #4
On 14-04-22, 13:44, Krzysztof Kozlowski wrote:
> On 14/04/2022 12:25, Vinod Koul wrote:
> >>>        Interrupt lines for each GPI instance
> >>> +    minItems: 1
> >>
> >> This should be some real case minimum, not just 1. Unless really only
> >> one interrupt is also possible in existing variations?
> > 
> > So that depends on the channels available to use which can be worst case
> > of 1. Maximum is 13.. Most of the controllers are between 12-13, but we
> > dont want to change binding in future if controller has lesser channels
> > right?
> 
> If the choice is per SoC-controller, then the best would be to limit in
> allOf:if:then. However maybe the number of channels depends also on
> other factor (e.g. secure world configuration)?

That is quite right. So we wont know how many channels are made
available..

So is min 1 acceptable or do you have an alternate ?
Krzysztof Kozlowski April 20, 2022, 11:11 a.m. UTC | #5
On 20/04/2022 12:36, Vinod Koul wrote:
>> If the choice is per SoC-controller, then the best would be to limit in
>> allOf:if:then. However maybe the number of channels depends also on
>> other factor (e.g. secure world configuration)?
> 
> That is quite right. So we wont know how many channels are made
> available..
> 
> So is min 1 acceptable or do you have an alternate ?

minItems:1 is ok.


Best regards,
Krzysztof
Vinod Koul April 20, 2022, 11:32 a.m. UTC | #6
On 20-04-22, 13:11, Krzysztof Kozlowski wrote:
> On 20/04/2022 12:36, Vinod Koul wrote:
> >> If the choice is per SoC-controller, then the best would be to limit in
> >> allOf:if:then. However maybe the number of channels depends also on
> >> other factor (e.g. secure world configuration)?
> > 
> > That is quite right. So we wont know how many channels are made
> > available..
> > 
> > So is min 1 acceptable or do you have an alternate ?
> 
> minItems:1 is ok.

Thanks, can I get an ack?
Krzysztof Kozlowski April 20, 2022, 12:06 p.m. UTC | #7
On 14/04/2022 08:42, Vinod Koul wrote:
> Add the minItems for interrupts property as well. In the absence of
> this, we get warning if interrupts are less than 13
> 
> arch/arm64/boot/dts/qcom/qrb5165-rb5.dtb:
> dma-controller@800000: interrupts: [[0, 588, 4], [0, 589, 4], [0, 590,
> 4], [0, 591, 4], [0, 592, 4], [0, 593, 4], [0, 594, 4], [0, 595, 4], [0,
>   596, 4], [0, 597, 4]] is too short
> 


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof
Vinod Koul April 20, 2022, 12:41 p.m. UTC | #8
On 14-04-22, 12:12, Vinod Koul wrote:
> Add the minItems for interrupts property as well. In the absence of
> this, we get warning if interrupts are less than 13
> 
> arch/arm64/boot/dts/qcom/qrb5165-rb5.dtb:
> dma-controller@800000: interrupts: [[0, 588, 4], [0, 589, 4], [0, 590,
> 4], [0, 591, 4], [0, 592, 4], [0, 593, 4], [0, 594, 4], [0, 595, 4], [0,
>   596, 4], [0, 597, 4]] is too short

Applied, thanks
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/dma/qcom,gpi.yaml b/Documentation/devicetree/bindings/dma/qcom,gpi.yaml
index 8a790ffbdaac..7d2fc4eb5530 100644
--- a/Documentation/devicetree/bindings/dma/qcom,gpi.yaml
+++ b/Documentation/devicetree/bindings/dma/qcom,gpi.yaml
@@ -32,6 +32,7 @@  properties:
   interrupts:
     description:
       Interrupt lines for each GPI instance
+    minItems: 1
     maxItems: 13
 
   "#dma-cells":