mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 22:14:03 +02:00
thermal/drivers/airoha: Fix copy paste error on clamp_t low temp
In airoha_thermal_set_trips, there is a copy paste error on clamping the
value for the low trip temp point. Fix it to the correct value and actually
clamp for the low variable.
Fixes: 42de37f40e ("thermal/drivers: Add support for Airoha EN7581 thermal sensor")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
Reviewed-by: Wayen Yan <win847@gmail.com>
Link: https://patch.msgid.link/20260702094846.17325-2-ansuelsmth@gmail.com
This commit is contained in:
parent
b08e97bee0
commit
251621813f
|
|
@ -273,7 +273,7 @@ static int airoha_thermal_set_trips(struct thermal_zone_device *tz, int low,
|
|||
|
||||
if (low != -INT_MAX) {
|
||||
/* Validate low and clamp it to a supported value */
|
||||
low = clamp_t(int, high, RAW_TO_TEMP(priv, 0),
|
||||
low = clamp_t(int, low, RAW_TO_TEMP(priv, 0),
|
||||
RAW_TO_TEMP(priv, FIELD_MAX(EN7581_DOUT_TADC_MASK)));
|
||||
|
||||
/* We offset the low temp of 1°C to trigger correct event */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user