Commit 0952177f2a1f (thermal/core/power_allocator: Update once cooling devices when temp is low)
add a update flag to update cooling device only once when temp is low.
But when the switch_on_temp is set to be a higher value, the cooling device state
may not be reset to max, because the last_temp is smaller than the switch_on_temp.
For example:
First:
swicth_on_temp=70 control_temp=85;
Then userspace change the trip_temp:
swicth_on_temp=45 control_temp=55 cur_temp=54
Then userspace reset the trip_temp:
swicth_on_temp=70 control_temp=85 cur_temp=57 last_temp=54
At this time, the cooling device state should be reset to be max.
However, because cur_temp(57) < switch_on_temp(70)
last_temp(54) < swicth_on_temp(70) --> update = false
When update is false, the cooling device state can not be reset.
So delete the update condition, so that the cooling device state
could be reset.
Fixes: 0952177f2a1f (thermal/core/power_allocator: Update once cooling devices when temp is low)
Signed-off-by: Di Shen <di.shen@xxxxxxxxxx>
---
drivers/thermal/gov_power_allocator.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)