mirror of
https://github.com/LineageOS/android_kernel_fxtec_sm6115.git
synced 2026-08-23 15:41:26 +00:00
drivers: thermal: step_wise: Handle the temperature stable trend
Step wise algorithm ignores the temperature stable trend, which can cause a case where step wise will not clear the mitigation, when the temperature is lower than hysteresis and stays stable throughout. In order to avoid this, consider temperature stable trend similar to temperature dropping trend. This will lower the mitigation when the temperature is less than hysteresis. Change-Id: Ic7d1d35c74d732562193195e46af945ef41912c2 Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
This commit is contained in:
@ -89,6 +89,7 @@ static unsigned long get_target_state(struct thermal_instance *instance,
|
||||
next_target = instance->upper;
|
||||
break;
|
||||
case THERMAL_TREND_DROPPING:
|
||||
case THERMAL_TREND_STABLE:
|
||||
if (cur_state <= instance->lower) {
|
||||
if (!throttle)
|
||||
next_target = THERMAL_NO_TARGET;
|
||||
|
||||
Reference in New Issue
Block a user