[PATCH] dt-bindings: thermal: Use signed integers for coefficients

From
Daniel Lezcano <hidden>
Date
2026-11-03 21:44:25
Also in
linux-devicetree, lkml
The coefficients property describes the coefficients of a linear
equation used to derive a thermal zone temperature. Both the slope
and the constant offset can be negative, and the thermal core stores
them as signed integers.

Existing Device Trees already rely on signed values. OMAP4460 uses
an offset of -9301, while OMAP5 uses offsets of -1791 and -2992.
Broadcom platforms also use negative slopes. Declaring the property
as uint32-array does not represent these values correctly.

Change the property type to int32-array so schema validation decodes
the cells as signed 32-bit integers, matching their intended meaning
and the thermal implementation. The cell width and binary encoding
remain unchanged, preserving compatibility with existing Device
Trees.

Fixes: 1202a442a31f ("dt-bindings: thermal: Add yaml bindings for thermal zones")
Signed-off-by: Daniel Lezcano <redacted>
---
 Documentation/devicetree/bindings/thermal/thermal-zones.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
index 999ad40a20d5..72e419124f98 100644
--- a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
+++ b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
@@ -101,7 +101,7 @@ patternProperties:
           thermal zone.
 
       coefficients:
-        $ref: /schemas/types.yaml#/definitions/uint32-array
+        $ref: /schemas/types.yaml#/definitions/int32-array
         description:
           An array of integers containing the coefficients of a linear equation
           that binds all the sensors listed in this thermal zone.
-- 
2.43.0
Thread (5 messages) 5 messages, 4 authors, last reply 12d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help