Skip to contentSkip to conversation

dt-bindings: iio: add missing reset-gpios constrain

PATCH Applied Krzysztof Kozlowski 3 participants 3 messages Oct 5, 2023 – Oct 10, 2023

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

PATCH 1/1 dt-bindings: iio: add missing reset-gpios constrain

The Documentation/devicetree/bindings/gpio/gpio-consumer-common.yaml schema does not enforce number of reset GPIOs, thus each device binding must do it.

---
 Documentation/devicetree/bindings/iio/addac/adi,ad74115.yaml | 3 ++-
 Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml    | 3 ++-
 Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml | 3 ++-
 Documentation/devicetree/bindings/iio/health/ti,afe4404.yaml | 3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/iio/addac/adi,ad74115.yaml +2 -1
index 2594fa192f93..2a04906531fb 100644
@@ -32,7 +32,8 @@ properties:
 
   spi-cpol: true
 
-  reset-gpios: true
+  reset-gpios:
+    maxItems: 1
 
   interrupts:
     minItems: 1
Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml +2 -1
index 4e508bfcc9d8..5121685337b5 100644
@@ -78,7 +78,8 @@ properties:
           - const: -1000
           - const: 22000
 
-  reset-gpios: true
+  reset-gpios:
+    maxItems: 1
 
   adi,dc-dc-ilim-microamp:
     enum: [150000, 200000, 250000, 300000, 350000, 400000]
Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml +2 -1
index b9b5beac33b2..5b6cde86b5a5 100644
@@ -23,7 +23,8 @@ properties:
     maxItems: 1
     description: Connected to ADC_RDY pin.
 
-  reset-gpios: true
+  reset-gpios:
+    maxItems: 1
 
 required:
   - compatible
Documentation/devicetree/bindings/iio/health/ti,afe4404.yaml +2 -1
index 2958c4ca75b4..167d10bd60af 100644
@@ -23,7 +23,8 @@ properties:
     maxItems: 1
     description: Connected to ADC_RDY pin.
 
-  reset-gpios: true
+  reset-gpios:
+    maxItems: 1
 
 additionalProperties: false
 
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Krzysztof Kozlowski

The Documentation/devicetree/bindings/gpio/gpio-consumer-common.yaml schema does not enforce number of reset GPIOs, thus each device binding must do it.

Thanks,
Conor.

Quoted 66 lines
---
 Documentation/devicetree/bindings/iio/addac/adi,ad74115.yaml | 3 ++-
 Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml    | 3 ++-
 Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml | 3 ++-
 Documentation/devicetree/bindings/iio/health/ti,afe4404.yaml | 3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/iio/addac/adi,ad74115.yaml +2 -1
index 2594fa192f93..2a04906531fb 100644
@@ -32,7 +32,8 @@ properties:
 
   spi-cpol: true
 
-  reset-gpios: true
+  reset-gpios:
+    maxItems: 1
 
   interrupts:
     minItems: 1
Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml +2 -1
index 4e508bfcc9d8..5121685337b5 100644
@@ -78,7 +78,8 @@ properties:
           - const: -1000
           - const: 22000
 
-  reset-gpios: true
+  reset-gpios:
+    maxItems: 1
 
   adi,dc-dc-ilim-microamp:
     enum: [150000, 200000, 250000, 300000, 350000, 400000]
Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml +2 -1
index b9b5beac33b2..5b6cde86b5a5 100644
@@ -23,7 +23,8 @@ properties:
     maxItems: 1
     description: Connected to ADC_RDY pin.
 
-  reset-gpios: true
+  reset-gpios:
+    maxItems: 1
 
 required:
   - compatible
Documentation/devicetree/bindings/iio/health/ti,afe4404.yaml +2 -1
index 2958c4ca75b4..167d10bd60af 100644
@@ -23,7 +23,8 @@ properties:
     maxItems: 1
     description: Connected to ADC_RDY pin.
 
-  reset-gpios: true
+  reset-gpios:
+    maxItems: 1
 
 additionalProperties: false
 
Signature · 1 line
2.34.1
maintainer Applied
#2 lore raw
Quoted 8 lines · On Thu, 5 Oct 2023 11:41:07 +0100 Conor Dooley <[email protected]> wrote:
Quoted 5 lines · Krzysztof Kozlowski

The Documentation/devicetree/bindings/gpio/gpio-consumer-common.yaml schema does not enforce number of reset GPIOs, thus each device binding must do it.

Applied to the fixes-togreg branch of iio.git

Thanks,

Jonathan

Quoted 70 lines

Thanks,
Conor.

Quoted 66 lines
---
 Documentation/devicetree/bindings/iio/addac/adi,ad74115.yaml | 3 ++-
 Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml    | 3 ++-
 Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml | 3 ++-
 Documentation/devicetree/bindings/iio/health/ti,afe4404.yaml | 3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/iio/addac/adi,ad74115.yaml +2 -1
index 2594fa192f93..2a04906531fb 100644
@@ -32,7 +32,8 @@ properties:
 
   spi-cpol: true
 
-  reset-gpios: true
+  reset-gpios:
+    maxItems: 1
 
   interrupts:
     minItems: 1
Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml +2 -1
index 4e508bfcc9d8..5121685337b5 100644
@@ -78,7 +78,8 @@ properties:
           - const: -1000
           - const: 22000
 
-  reset-gpios: true
+  reset-gpios:
+    maxItems: 1
 
   adi,dc-dc-ilim-microamp:
     enum: [150000, 200000, 250000, 300000, 350000, 400000]
Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml +2 -1
index b9b5beac33b2..5b6cde86b5a5 100644
@@ -23,7 +23,8 @@ properties:
     maxItems: 1
     description: Connected to ADC_RDY pin.
 
-  reset-gpios: true
+  reset-gpios:
+    maxItems: 1
 
 required:
   - compatible
Documentation/devicetree/bindings/iio/health/ti,afe4404.yaml +2 -1
index 2958c4ca75b4..167d10bd60af 100644
@@ -23,7 +23,8 @@ properties:
     maxItems: 1
     description: Connected to ADC_RDY pin.
 
-  reset-gpios: true
+  reset-gpios:
+    maxItems: 1
 
 additionalProperties: false
 
Signature · 1 line
2.34.1