]> Git Repo - J-linux.git/commitdiff
dt-bindings: thermal: loongson,ls2k-thermal: Fix incorrect compatible definition
authorBinbin Zhou <[email protected]>
Tue, 23 Apr 2024 01:59:02 +0000 (09:59 +0800)
committerDaniel Lezcano <[email protected]>
Tue, 23 Apr 2024 10:40:30 +0000 (12:40 +0200)
The temperature output register of the Loongson-2K2000 is defined in the
chip configuration domain, which is different from the Loongson-2K1000,
so it can't be fallbacked.

We need to use two groups of registers to describe it: the first group
is the high and low temperature threshold setting register; the second
group is the temperature output register.

It is true that this fix will cause ABI corruption, but it is necessary
otherwise the Loongson-2K2000 temperature sensor will not work properly.

Fixes: 72684d99a854 ("thermal: dt-bindings: add loongson-2 thermal")
Cc: Yinbo Zhu <[email protected]>
Signed-off-by: Binbin Zhou <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Acked-by: Huacai Chen <[email protected]>
Signed-off-by: Daniel Lezcano <[email protected]>
Link: https://lore.kernel.org/r/5198999d679f1a1c3457385acb9fadfc85da1f1e.1713837379.git.zhoubinbin@loongson.cn
Documentation/devicetree/bindings/thermal/loongson,ls2k-thermal.yaml

index 9748a479dcd4de4a0415220326330af1c6b8b446..ca81c8afba79c673aea6dba21e21deb0adbe43d1 100644 (file)
@@ -18,14 +18,15 @@ properties:
     oneOf:
       - enum:
           - loongson,ls2k1000-thermal
+          - loongson,ls2k2000-thermal
       - items:
           - enum:
               - loongson,ls2k0500-thermal
-              - loongson,ls2k2000-thermal
           - const: loongson,ls2k1000-thermal
 
   reg:
-    maxItems: 1
+    minItems: 1
+    maxItems: 2
 
   interrupts:
     maxItems: 1
@@ -39,6 +40,24 @@ required:
   - interrupts
   - '#thermal-sensor-cells'
 
+if:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - loongson,ls2k2000-thermal
+
+then:
+  properties:
+    reg:
+      minItems: 2
+      maxItems: 2
+
+else:
+  properties:
+    reg:
+      maxItems: 1
+
 unevaluatedProperties: false
 
 examples:
This page took 0.052598 seconds and 4 git commands to generate.