Skip to contentSkip to conversation

dt-bindings: fsl-qdma: fix interrupts 'if' check logic

PATCH Applied Frank Li 3 participants 3 messages Jul 1, 2024 – Jul 10, 2024

Subsystems (3)
lore
Share & tools
lore

Frank Li

author maintainer
#0 lore raw

PATCH v2 1/1 dt-bindings: fsl-qdma: fix interrupts 'if' check logic

All compatible string include 'fsl,ls1021a-qdma'. Previous if check are always true.

if:
properties:
compatible:
contains:
enum:
- fsl,ls1021a-qdma

Change to check other compatible strings to get correct logic and fix below CHECK_DTB warnings.

arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var1.dtb:
dma-controller@8380000: interrupts: [[0, 43, 4], [0, 251, 4], [0, 252, 4], [0, 253, 4], [0, 254, 4]] is too long

---
Change from v1 to v2
- Change maxItems: 5 to minItems: 5. because maxItems: 5 already restrict at top

interrupts:
minItems: 2
maxItems: 5

---
 Documentation/devicetree/bindings/dma/fsl-qdma.yaml | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/dma/fsl-qdma.yaml +9 -1
index 25e410a149fce..9401b1f6300d4 100644
@@ -92,8 +92,16 @@ allOf:
         compatible:
           contains:
             enum:
-              - fsl,ls1021a-qdma
+              - fsl,ls1028a-qdma
+              - fsl,ls1043a-qdma
+              - fsl,ls1046a-qdma
     then:
+      properties:
+        interrupts:
+          minItems: 5
+        interrupt-names:
+          minItems: 5
+    else:
       properties:
         interrupts:
           maxItems: 3
Signature · 1 line
2.34.1
maintainer Reviewed-by on v2 1/1
#1 lore raw
Quoted 22 lines · Frank Li

All compatible string include 'fsl,ls1021a-qdma'. Previous if check are always true.

if:
properties:
compatible:
contains:
enum:
- fsl,ls1021a-qdma

Change to check other compatible strings to get correct logic and fix below CHECK_DTB warnings.

arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28-var1.dtb:
dma-controller@8380000: interrupts: [[0, 43, 4], [0, 251, 4], [0, 252, 4], [0, 253, 4], [0, 254, 4]] is too long

---
Change from v1 to v2
- Change maxItems: 5 to minItems: 5. because maxItems: 5 already restrict at top

Quoted 7 lines

interrupts:
minItems: 2
maxItems: 5

---
 Documentation/devicetree/bindings/dma/fsl-qdma.yaml | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
maintainer Applied
#2 lore raw
In reply to Frank Li
Quoted 11 lines · Frank Li

All compatible string include 'fsl,ls1021a-qdma'. Previous if check are always true.

if:
properties:
compatible:
contains:
enum:
- fsl,ls1021a-qdma

[...]

Applied, thanks!

[1/1] dt-bindings: fsl-qdma: fix interrupts 'if' check logic

      commit: b8ec9dba02a74797421c52b1226b23a4302362a6

Best regards,

Signature · 1 line
Vinod Koul <[email protected]>