summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGUI <[email protected]>2025-03-05 17:29:24 +0800
committerRbb666 <[email protected]>2025-03-10 22:48:28 +0800
commit3ae152866e8f013b81edc19e2439cea17156a08c (patch)
tree90a130e8e8d74993c8e0e80c6caf2b1de2d9cecd
parentacd4a187e39c234b58df35f7eb3562e97f85df99 (diff)
[DM/THERMAL] fixup coefficients's offset lost
coefficients is double u32 data list.
-rw-r--r--components/drivers/thermal/thermal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/drivers/thermal/thermal.c b/components/drivers/thermal/thermal.c
index 9343fe137a..7832153f6f 100644
--- a/components/drivers/thermal/thermal.c
+++ b/components/drivers/thermal/thermal.c
@@ -48,7 +48,7 @@ static void thermal_ofw_params_parse(struct rt_ofw_node *np,
* For now, the thermal framework supports only one sensor per thermal zone.
* Thus, we are considering only the first two values as slope and offset.
*/
- if (rt_ofw_prop_read_u32_array_index(np, "coefficients", 0, 1, coef) < 0)
+ if (rt_ofw_prop_read_u32_array_index(np, "coefficients", 0, 2, coef) < 0)
{
coef[0] = 1;
coef[1] = 0;