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: ...@@ -62,25 +62,35 @@ properties:
"#thermal-sensor-cells": "#thermal-sensor-cells":
const: 0 const: 0
if: required:
- compatible
- reg
allOf:
- if:
not:
properties: properties:
compatible: compatible:
contains: contains:
enum: enum:
- renesas,thermal-r8a73a4 # R-Mobile APE6 - renesas,thermal-r8a73a4 # R-Mobile APE6
- renesas,thermal-r8a7779 # R-Car H1 - renesas,thermal-r8a7779 # R-Car H1
then: then:
required: required:
- compatible - resets
- reg - '#thermal-sensor-cells'
else:
- if:
not:
properties:
compatible:
contains:
const: renesas,thermal-r8a7779 # R-Car H1
then:
required: required:
- compatible
- reg
- interrupts - interrupts
- clocks - clocks
- power-domains - power-domains
- resets
additionalProperties: false 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