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: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201028153541.1736279-1-geert+renesas@glider.be
This commit is contained in:
parent
236761f19a
commit
7cfa9770f4
@ -62,25 +62,35 @@ properties:
|
|||||||
"#thermal-sensor-cells":
|
"#thermal-sensor-cells":
|
||||||
const: 0
|
const: 0
|
||||||
|
|
||||||
if:
|
required:
|
||||||
properties:
|
- compatible
|
||||||
compatible:
|
- reg
|
||||||
contains:
|
|
||||||
enum:
|
allOf:
|
||||||
- renesas,thermal-r8a73a4 # R-Mobile APE6
|
- if:
|
||||||
- renesas,thermal-r8a7779 # R-Car H1
|
not:
|
||||||
then:
|
properties:
|
||||||
required:
|
compatible:
|
||||||
- compatible
|
contains:
|
||||||
- reg
|
enum:
|
||||||
else:
|
- renesas,thermal-r8a73a4 # R-Mobile APE6
|
||||||
required:
|
- renesas,thermal-r8a7779 # R-Car H1
|
||||||
- compatible
|
then:
|
||||||
- reg
|
required:
|
||||||
- interrupts
|
- resets
|
||||||
- clocks
|
- '#thermal-sensor-cells'
|
||||||
- power-domains
|
|
||||||
- resets
|
- if:
|
||||||
|
not:
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
contains:
|
||||||
|
const: renesas,thermal-r8a7779 # R-Car H1
|
||||||
|
then:
|
||||||
|
required:
|
||||||
|
- interrupts
|
||||||
|
- clocks
|
||||||
|
- power-domains
|
||||||
|
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user