linux-pm.vger.kernel.org archive mirror
 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

* Re: [PATCH v3] dt-bindings: thermal: rcar-thermal: Improve schema validation
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Lezcano @ 2020-11-12 11:32 UTC (permalink / raw)
  To: Geert Uytterhoeven, Niklas Söderlund, Zhang Rui,
	Amit Kucheria, Rob Herring
  Cc: linux-renesas-soc, linux-pm, devicetree, Amit Kucheria, Rob Herring

On 28/10/2020 16:35, Geert Uytterhoeven wrote:
>   - 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>
> ---

Applied, thanks


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

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

* [thermal: thermal/next] dt-bindings: thermal: rcar-thermal: Improve schema validation
  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-bot for Geert Uytterhoeven
  1 sibling, 0 replies; 3+ messages in thread
From: thermal-bot for Geert Uytterhoeven @ 2020-11-24  9:36 UTC (permalink / raw)
  To: linux-pm
  Cc: Geert Uytterhoeven, niklas.soderlund, Amit Kucheria, Rob Herring,
	Daniel Lezcano, rui.zhang, amitk

The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     7cfa9770f485c03c877db4a66bbfda96df367b98
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//7cfa9770f485c03c877db4a66bbfda96df367b98
Author:        Geert Uytterhoeven <geert+renesas@glider.be>
AuthorDate:    Wed, 28 Oct 2020 16:35:41 +01:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Thu, 12 Nov 2020 12:32:30 +01:00

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
---
 Documentation/devicetree/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 7e9557a..927de79 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
 

^ 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).