diff mbox series

[4/6] dt-bindings: thermal: samsung,exynos: add exynos850-tmu string

Message ID 20240719120853.1924771-5-m.majewski2@samsung.com
State New
Headers show
Series Add initial Exynos 850 support to the thermal driver | expand

Commit Message

Mateusz Majewski July 19, 2024, 12:08 p.m. UTC
Note that unlike others, Exynos 850 does not require clocks, hence we
have to be a little be more specific about when the related properties
are required.

Signed-off-by: Mateusz Majewski <m.majewski2@samsung.com>
---
 .../thermal/samsung,exynos-thermal.yaml       | 26 +++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

Comments

Sam Protsenko July 22, 2024, 9:26 p.m. UTC | #1
On Fri, Jul 19, 2024 at 7:10 AM Mateusz Majewski
<m.majewski2@samsung.com> wrote:
>
> Note that unlike others, Exynos 850 does not require clocks, hence we
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.yaml b/Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.yaml
index 29a08b0729ee..4363ee625339 100644
--- a/Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.yaml
+++ b/Documentation/devicetree/bindings/thermal/samsung,exynos-thermal.yaml
@@ -27,6 +27,7 @@  properties:
       - samsung,exynos5420-tmu-ext-triminfo
       - samsung,exynos5433-tmu
       - samsung,exynos7-tmu
+      - samsung,exynos850-tmu
 
   clocks:
     minItems: 1
@@ -69,8 +70,6 @@  properties:
 
 required:
   - compatible
-  - clocks
-  - clock-names
   - interrupts
   - reg
 
@@ -82,6 +81,9 @@  allOf:
           contains:
             const: samsung,exynos5420-tmu-ext-triminfo
     then:
+      required:
+        - clocks
+        - clock-names
       properties:
         clocks:
           items:
@@ -105,6 +107,9 @@  allOf:
               - samsung,exynos5433-tmu
               - samsung,exynos7-tmu
     then:
+      required:
+        - clocks
+        - clock-names
       properties:
         clocks:
           items:
@@ -132,6 +137,9 @@  allOf:
               - samsung,exynos5260-tmu
               - samsung,exynos5420-tmu
     then:
+      required:
+        - clocks
+        - clock-names
       properties:
         clocks:
           minItems: 1
@@ -140,6 +148,20 @@  allOf:
           minItems: 1
           maxItems: 1
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - samsung,exynos850-tmu
+    then:
+      properties:
+        clocks: false
+        clock-names: false
+        reg:
+          minItems: 1
+          maxItems: 1
+
 additionalProperties: false
 
 examples: