[COMMON] thermal: power_allocator: Use last active point as switch_on
authorHyeonseong Gil <hs.gil@samsung.com>
Thu, 11 Aug 2016 04:14:27 +0000 (13:14 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:13:23 +0000 (17:13 +0900)
If only one passive temperature exists,
use the last active temperature below passive point
as switch_on temperature.

Change-Id: I57a8d94683881d10af5de30d57287159517ec364
Signed-off-by: Hyeonseong Gil <hs.gil@samsung.com>
drivers/thermal/power_allocator.c

index 40debd67bf6848d88245a6c2d4b6f8f668f280a5..eee892bdebc0e688aa4f1a036eae5e71cfdd5dde 100644 (file)
@@ -522,7 +522,7 @@ static void get_governor_trips(struct thermal_zone_device *tz,
                params->trip_max_desired_temperature = last_passive;
        } else if (found_first_passive) {
                params->trip_max_desired_temperature = params->trip_switch_on;
-               params->trip_switch_on = INVALID_TRIP;
+               params->trip_switch_on = last_active;
        } else {
                params->trip_switch_on = INVALID_TRIP;
                params->trip_max_desired_temperature = last_active;