Commit 7cfa9770 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Daniel Lezcano

dt-bindings: thermal: rcar-thermal: Improve schema validation

- Factor out common required properties,
  - "interrupts", "clocks", and "power-domains" are required on R-Mobile
    APE6, too,
  - Invert logic to simplify descriptions.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarNiklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: default avatarAmit Kucheria <amit.kucheria@linaro.org>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201028153541.1736279-1-geert+renesas@glider.be
parent 236761f1
......@@ -62,25 +62,35 @@ properties:
"#thermal-sensor-cells":
const: 0
if:
properties:
compatible:
contains:
enum:
- renesas,thermal-r8a73a4 # R-Mobile APE6
- renesas,thermal-r8a7779 # R-Car H1
then:
required:
- compatible
- reg
else:
required:
- compatible
- reg
- interrupts
- clocks
- power-domains
- resets
required:
- compatible
- reg
allOf:
- if:
not:
properties:
compatible:
contains:
enum:
- renesas,thermal-r8a73a4 # R-Mobile APE6
- renesas,thermal-r8a7779 # R-Car H1
then:
required:
- resets
- '#thermal-sensor-cells'
- if:
not:
properties:
compatible:
contains:
const: renesas,thermal-r8a7779 # R-Car H1
then:
required:
- interrupts
- clocks
- power-domains
additionalProperties: false
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment