All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] dt-bindings: thermal: rcar-thermal: Improve schema validation
@ 2020-10-28 15:35 Geert Uytterhoeven
  2020-11-12 11:32 ` Daniel Lezcano
  2020-11-24  9:36 ` [thermal: thermal/next] " thermal-bot for Geert Uytterhoeven
  0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2020-10-28 15:35 UTC (permalink / raw)
  To: Niklas Söderlund, Zhang Rui, Daniel Lezcano, Amit Kucheria,
	Rob Herring
  Cc: linux-renesas-soc, linux-pm, devicetree, Geert Uytterhoeven,
	Amit Kucheria, Rob Herring

  - 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>
---
v3:
  - Rebase on top of commit 5be478f9c24fbdf8 ("dt-bindings: Another
    round of adding missing 'additionalProperties'"),

v2:
  - Add Reviewed-by.
---
 .../bindings/thermal/rcar-thermal.yaml        | 48 +++++++++++--------
 1 file changed, 29 insertions(+), 19 deletions(-)

diff --git a/Documentation/devicetree/bindings/thermal/rcar-thermal.yaml b/Documentation/devicetree/bindings/thermal/rcar-thermal.yaml
index 7e9557ac0e4a011c..927de79ab4b56e37 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
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-24  9:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28 15:35 [PATCH v3] dt-bindings: thermal: rcar-thermal: Improve schema validation Geert Uytterhoeven
2020-11-12 11:32 ` Daniel Lezcano
2020-11-24  9:36 ` [thermal: thermal/next] " thermal-bot for Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.