]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
dt-bindings: timer: Simplify conditional expressions
authorSamuel Holland <samuel@sholland.org>
Mon, 22 Mar 2021 04:47:03 +0000 (23:47 -0500)
committerMaxime Ripard <maxime@cerno.tech>
Tue, 11 May 2021 08:17:50 +0000 (10:17 +0200)
The sun4i timer IP block has a variable number of interrupts based on
the compatible. Use enums to combine the two sections for the existing
3-interrupt variants, and to simplify adding new compatible strings.

Acked-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20210322044707.19479-2-samuel@sholland.org
Documentation/devicetree/bindings/timer/allwinner,sun4i-a10-timer.yaml

index 1c7cf32e7ac2a91da11a1061822112b17eca790a..3462598e609db91b459f1ea58220c5e22a2e133f 100644 (file)
@@ -34,8 +34,8 @@ allOf:
   - if:
       properties:
         compatible:
-          items:
-            const: allwinner,sun4i-a10-timer
+          enum:
+            - allwinner,sun4i-a10-timer
 
     then:
       properties:
@@ -46,8 +46,8 @@ allOf:
   - if:
       properties:
         compatible:
-          items:
-            const: allwinner,sun8i-a23-timer
+          enum:
+            - allwinner,sun8i-a23-timer
 
     then:
       properties:
@@ -58,20 +58,9 @@ allOf:
   - if:
       properties:
         compatible:
-          items:
-            const: allwinner,sun8i-v3s-timer
-
-    then:
-      properties:
-        interrupts:
-          minItems: 3
-          maxItems: 3
-
-  - if:
-      properties:
-        compatible:
-          items:
-            const: allwinner,suniv-f1c100s-timer
+          enum:
+            - allwinner,sun8i-v3s-timer
+            - allwinner,suniv-f1c100s-timer
 
     then:
       properties: