diff mbox series

[V2,2/2] dt-bindings: gpio: vf610: update gpio-ranges

Message ID 20230330100550.2049687-2-peng.fan@oss.nxp.com
State New
Headers show
Series [V2,1/2] dt-bindings: gpio: fsl-imx-gpio: update gpio-ranges | expand

Commit Message

Peng Fan (OSS) March 30, 2023, 10:05 a.m. UTC
From: Peng Fan <peng.fan@nxp.com>

And bounds for gpio-ranges to address dtbs_error.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---

V2:
 Enlarge bounds, and still restrict as 1 for previous devices
 Add A-b

 .../devicetree/bindings/gpio/gpio-vf610.yaml      | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

Comments

Andrew Lunn March 31, 2023, 11:55 a.m. UTC | #1
On Thu, Mar 30, 2023 at 06:05:50PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> And bounds for gpio-ranges to address dtbs_error.
> 
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Linus Walleij March 31, 2023, 12:45 p.m. UTC | #2
On Thu, Mar 30, 2023 at 12:00 PM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote:

> From: Peng Fan <peng.fan@nxp.com>
>
> And bounds for gpio-ranges to address dtbs_error.
>
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>
> V2:
>  Enlarge bounds, and still restrict as 1 for previous devices
>  Add A-b

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
index d2c39dba56ad..69eac4194459 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
+++ b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
@@ -59,7 +59,8 @@  properties:
       - const: port
 
   gpio-ranges:
-    maxItems: 1
+    minItems: 1
+    maxItems: 32
 
 required:
   - compatible
@@ -70,6 +71,18 @@  required:
   - "#gpio-cells"
   - gpio-controller
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - fsl,vf610-gpio
+    then:
+      properties:
+        gpio-ranges:
+          maxItems: 1
+
 additionalProperties: false
 
 examples: