From: Lukasz Luba <lukasz.luba@arm.com>
To: Daniel Lezcano <daniel.lezcano@oss.qualcomm.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@kernel.org>,
Zhang Rui <rui.zhang@intel.com>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
"open list:THERMAL" <linux-pm@vger.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dt-bindings: thermal: Use signed integers for coefficients
Date: Thu, 5 Nov 2026 10:45:20 +0000 [thread overview]
Message-ID: <a53ebde3-ca2b-46dc-b4bc-93379b05a1a8@arm.com> (raw)
In-Reply-To: <20261103214357.2700244-1-daniel.lezcano@oss.qualcomm.com>
Hi Daniel,
On 11/3/26 21:43, Daniel Lezcano wrote:
> 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.
This looks like a good argument which was missed back then (that
the negative values are possible).
>
> 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 <daniel.lezcano@oss.qualcomm.com>
> ---
> 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.
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Regards,
Lukasz
next prev parent reply other threads:[~2026-11-05 10:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 21:43 Daniel Lezcano
2026-11-05 10:45 ` Lukasz Luba [this message]
2026-11-05 15:32 ` Daniel Lezcano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a53ebde3-ca2b-46dc-b4bc-93379b05a1a8@arm.com \
--to=lukasz.luba@arm.com \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@kernel.org \
--cc=daniel.lezcano@oss.qualcomm.com \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®