Skip to contentSkip to conversation

dt-bindings: mmc: PL18x stop relying on order of dma-names

PATCH In review David Heidelberg 4 participants 4 messages Dec 24, 2021 – Jan 4, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: mmc: PL18x stop relying on order of dma-names

We don't care in which order are "rx" and "tx" DMA names supplied.

Fixes 4df297aaeb9c ("dt-bindings: mmc: Add missing properties used in examples")
---
 Documentation/devicetree/bindings/mmc/arm,pl18x.yaml | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/mmc/arm,pl18x.yaml +7 -3
index f0a44b2cfa79..a4f74bec68a3 100644
@@ -70,9 +70,13 @@ properties:
     maxItems: 2
 
   dma-names:
-    items:
-      - const: rx
-      - const: tx
+    oneOf:
+      - items:
+          - const: tx
+          - const: rx
+      - items:
+          - const: rx
+          - const: tx
 
   power-domains: true
 
Signature · 1 line
2.34.1
#2 lore raw
In reply to David Heidelberg
Quoted 6 lines · David Heidelberg

We don't care in which order are "rx" and "tx" DMA names supplied.

Fixes 4df297aaeb9c ("dt-bindings: mmc: Add missing properties used in examples")

Applied for next, thanks!

Kind regards
Uffe

Quoted 28 lines
---
 Documentation/devicetree/bindings/mmc/arm,pl18x.yaml | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/mmc/arm,pl18x.yaml +7 -4
index f0a44b2cfa79..a4f74bec68a3 100644
@@ -70,9 +70,13 @@ properties:
     maxItems: 2
 
   dma-names:
-    items:
-      - const: rx
-      - const: tx
+    oneOf:
+      - items:
+          - const: tx
+          - const: rx
+      - items:
+          - const: rx
+          - const: tx
 
   power-domains: true
 
--

2.34.1

maintainer
#3 lore raw
In reply to David Heidelberg
Quoted 2 lines · David Heidelberg

We don't care in which order are "rx" and "tx" DMA names supplied.

I do. Other than avoiding dts changes, why do we need undefined order here?

Quoted 2 lines
Fixes 4df297aaeb9c ("dt-bindings: mmc: Add missing properties used in examples")

Drop the blank line.

Quoted 13 lines
---
 Documentation/devicetree/bindings/mmc/arm,pl18x.yaml | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/mmc/arm,pl18x.yaml +0 -0
index f0a44b2cfa79..a4f74bec68a3 100644
@@ -70,9 +70,13 @@ properties:
     maxItems: 2
 
   dma-names:

Documentation/devicetree/bindings/mmc/arm,pl18x.yaml properties: · line 79

Quoted 10 lines
Documentation/devicetree/bindings/mmc/arm,pl18x.yaml +7 -3
-    items:
-      - const: rx
-      - const: tx
+    oneOf:
+      - items:
+          - const: tx
+          - const: rx
+      - items:
+          - const: rx
+          - const: tx

For future reference, the concise way to express this is:

maxItems: 2
items:
enum: [ rx, tx ]

Quoted 7 lines
Documentation/devicetree/bindings/mmc/arm,pl18x.yaml +0 -0
   power-domains: true
 
Signature · 1 line
2.34.1