dt-bindings: timer: Simplify conditional expressions

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
This commit is contained in:
Samuel Holland
2021-03-21 23:47:03 -05:00
committed by Maxime Ripard
parent d0aac8cbbd
commit 5bd1503133

View 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: