aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal/step_wise.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/thermal/step_wise.c')
-rw-r--r--drivers/thermal/step_wise.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/thermal/step_wise.c b/drivers/thermal/step_wise.c
index f251521baaa2..fdd1f523a1ed 100644
--- a/drivers/thermal/step_wise.c
+++ b/drivers/thermal/step_wise.c
@@ -23,6 +23,7 @@
23 */ 23 */
24 24
25#include <linux/thermal.h> 25#include <linux/thermal.h>
26#include <trace/events/thermal.h>
26 27
27#include "thermal_core.h" 28#include "thermal_core.h"
28 29
@@ -76,7 +77,7 @@ static unsigned long get_target_state(struct thermal_instance *instance,
76 next_target = instance->upper; 77 next_target = instance->upper;
77 break; 78 break;
78 case THERMAL_TREND_DROPPING: 79 case THERMAL_TREND_DROPPING:
79 if (cur_state == instance->lower) { 80 if (cur_state <= instance->lower) {
80 if (!throttle) 81 if (!throttle)
81 next_target = THERMAL_NO_TARGET; 82 next_target = THERMAL_NO_TARGET;
82 } else { 83 } else {
@@ -129,8 +130,10 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip)
129 130
130 trend = get_tz_trend(tz, trip); 131 trend = get_tz_trend(tz, trip);
131 132
132 if (tz->temperature >= trip_temp) 133 if (tz->temperature >= trip_temp) {
133 throttle = true; 134 throttle = true;
135 trace_thermal_zone_trip(tz, trip, trip_type);
136 }
134 137
135 dev_dbg(&tz->device, "Trip%d[type=%d,temp=%ld]:trend=%d,throttle=%d\n", 138 dev_dbg(&tz->device, "Trip%d[type=%d,temp=%ld]:trend=%d,throttle=%d\n",
136 trip, trip_type, trip_temp, trend, throttle); 139 trip, trip_type, trip_temp, trend, throttle);