diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2020-10-28 16:35:41 +0100 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2020-11-12 12:32:30 +0100 |
commit | 7cfa9770f485c03c877db4a66bbfda96df367b98 (patch) | |
tree | 2ec10bcb3d9ee05ab4f20680b77760789a288f99 /Documentation/devicetree/bindings/thermal | |
parent | 236761f19a4f373354f1dcf399b57753f1f4b871 (diff) | |
download | linux-7cfa9770f485c03c877db4a66bbfda96df367b98.tar.bz2 |
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
Diffstat (limited to 'Documentation/devicetree/bindings/thermal')
-rw-r--r-- | Documentation/devicetree/bindings/thermal/rcar-thermal.yaml | 48 |
1 files changed, 29 insertions, 19 deletions
diff --git a/Documentation/devicetree/bindings/thermal/rcar-thermal.yaml b/Documentation/devicetree/bindings/thermal/rcar-thermal.yaml index 7e9557ac0e4a..927de79ab4b5 100644 --- a/Documentation/devicetree/bindings/thermal/rcar-thermal.yaml +++ b/Documentation/devicetree/bindings/thermal/rcar-thermal.yaml @@ -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 |