diff mbox series

dt-bindings: gpio: zynq: Describe gpio-line-names

Message ID 4b9db94cdd8ca106feee53f76fab2a23721f7d2a.1634290039.git.michal.simek@xilinx.com (mailing list archive)
State New, archived
Headers show
Series dt-bindings: gpio: zynq: Describe gpio-line-names | expand

Commit Message

Michal Simek Oct. 15, 2021, 9:27 a.m. UTC
Number of lines depends on compatible string from 58 to 174.
That's why it is checked based on it.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 .../devicetree/bindings/gpio/gpio-zynq.yaml   | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)

Comments

Rob Herring (Arm) Oct. 26, 2021, 9:20 p.m. UTC | #1
On Fri, 15 Oct 2021 11:27:23 +0200, Michal Simek wrote:
> Number of lines depends on compatible string from 58 to 174.
> That's why it is checked based on it.
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
> 
>  .../devicetree/bindings/gpio/gpio-zynq.yaml   | 50 +++++++++++++++++++
>  1 file changed, 50 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Michal Simek May 16, 2022, 2:52 p.m. UTC | #2
pá 15. 10. 2021 v 11:27 odesílatel Michal Simek
<michal.simek@xilinx.com> napsal:
>
> Number of lines depends on compatible string from 58 to 174.
> That's why it is checked based on it.
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
>  .../devicetree/bindings/gpio/gpio-zynq.yaml   | 50 +++++++++++++++++++
>  1 file changed, 50 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/gpio/gpio-zynq.yaml b/Documentation/devicetree/bindings/gpio/gpio-zynq.yaml
> index da95b951c23e..29c27eadbac8 100644
> --- a/Documentation/devicetree/bindings/gpio/gpio-zynq.yaml
> +++ b/Documentation/devicetree/bindings/gpio/gpio-zynq.yaml
> @@ -28,6 +28,11 @@ properties:
>
>    gpio-controller: true
>
> +  gpio-line-names:
> +    description: strings describing the names of each gpio line
> +    minItems: 58
> +    maxItems: 174
> +
>    interrupt-controller: true
>
>    "#interrupt-cells":
> @@ -39,6 +44,51 @@ properties:
>    power-domains:
>      maxItems: 1
>
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - xlnx,zynqmp-gpio-1.0
> +    then:
> +      properties:
> +        gpio-line-names:
> +          minItems: 174
> +          maxItems: 174
> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - xlnx,zynq-gpio-1.0
> +    then:
> +      properties:
> +        gpio-line-names:
> +          minItems: 118
> +          maxItems: 118
> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - xlnx,versal-gpio-1.0
> +    then:
> +      properties:
> +        gpio-line-names:
> +          minItems: 58
> +          maxItems: 58
> +
> +  - if:
> +      properties:
> +        compatible:
> +          enum:
> +            - xlnx,pmc-gpio-1.0
> +    then:
> +      properties:
> +        gpio-line-names:
> +          minItems: 116
> +          maxItems: 116
> +
>  required:
>    - compatible
>    - reg
> --
> 2.33.1
>

Applied.
M
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/gpio/gpio-zynq.yaml b/Documentation/devicetree/bindings/gpio/gpio-zynq.yaml
index da95b951c23e..29c27eadbac8 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-zynq.yaml
+++ b/Documentation/devicetree/bindings/gpio/gpio-zynq.yaml
@@ -28,6 +28,11 @@  properties:
 
   gpio-controller: true
 
+  gpio-line-names:
+    description: strings describing the names of each gpio line
+    minItems: 58
+    maxItems: 174
+
   interrupt-controller: true
 
   "#interrupt-cells":
@@ -39,6 +44,51 @@  properties:
   power-domains:
     maxItems: 1
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          enum:
+            - xlnx,zynqmp-gpio-1.0
+    then:
+      properties:
+        gpio-line-names:
+          minItems: 174
+          maxItems: 174
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - xlnx,zynq-gpio-1.0
+    then:
+      properties:
+        gpio-line-names:
+          minItems: 118
+          maxItems: 118
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - xlnx,versal-gpio-1.0
+    then:
+      properties:
+        gpio-line-names:
+          minItems: 58
+          maxItems: 58
+
+  - if:
+      properties:
+        compatible:
+          enum:
+            - xlnx,pmc-gpio-1.0
+    then:
+      properties:
+        gpio-line-names:
+          minItems: 116
+          maxItems: 116
+
 required:
   - compatible
   - reg