Skip to contentSkip to conversation

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

PATCH Applied Vinod Koul 2 participants 9 messages Apr 14, 2022 – Apr 20, 2022

Subsystems (3)
lore
Share & tools
lore

Vinod Koul

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: dmaengine: qcom: gpi: Add minItems for interrupts

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

---
 Documentation/devicetree/bindings/dma/qcom,gpi.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/dma/qcom,gpi.yaml +1 -0
index 8a790ffbdaac..7d2fc4eb5530 100644
@@ -32,6 +32,7 @@ properties:
   interrupts:
     description:
       Interrupt lines for each GPI instance
+    minItems: 1
     maxItems: 13
 
   "#dma-cells":
Signature · 1 line
2.34.1
#1 lore raw
Quoted 18 lines · Vinod Koul

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

---
 Documentation/devicetree/bindings/dma/qcom,gpi.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/dma/qcom,gpi.yaml +0 -0
index 8a790ffbdaac..7d2fc4eb5530 100644

Documentation/devicetree/bindings/dma/qcom,gpi.yaml properties: · line 35

Quoted 4 lines
Documentation/devicetree/bindings/dma/qcom,gpi.yaml +1 -0
@@ -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

author maintainer
#2 lore raw
Quoted 14 lines · Krzysztof Kozlowski
Quoted 13 lines · Vinod Koul

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

---
 Documentation/devicetree/bindings/dma/qcom,gpi.yaml | 1 +
 1 file changed, 1 insertion(+)
Quoted 12 lines

Documentation/devicetree/bindings/dma/qcom,gpi.yaml properties: · line 35

Quoted 9 lines
Documentation/devicetree/bindings/dma/qcom,gpi.yaml +1 -0
index 8a790ffbdaac..7d2fc4eb5530 100644
@@ -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?

Signature · 1 line
~Vinod
#3 lore raw
Quoted 10 lines · Vinod Koul
Quoted 5 lines
Quoted 2 lines

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

author maintainer
#4 lore raw
Quoted 7 lines · Krzysztof Kozlowski
Quoted 6 lines · Vinod Koul
Quoted 5 lines
Quoted 2 lines

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?

Quoted 8 lines
Quoted 4 lines

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 ?

Signature · 1 line
~Vinod
#5 lore raw
Quoted 8 lines · Vinod Koul
Quoted 3 lines

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

author maintainer
#6 lore raw
Quoted 11 lines · Krzysztof Kozlowski
Quoted 8 lines · Vinod Koul
Quoted 3 lines

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?

Signature · 1 line
~Vinod
Acked-by on v1 1/1
#7 lore raw
In reply to Vinod Koul
Quoted 8 lines · Vinod Koul

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

Best regards,
Krzysztof

author maintainer Applied
#8 lore raw
In reply to Vinod Koul
Quoted 7 lines · Vinod Koul

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

Signature · 1 line
~Vinod