|
17 | 17 | #include "thermal_core.h" |
18 | 18 |
|
19 | 19 | /* |
20 | | - * If the temperature is higher than a hysteresis temperature, |
| 20 | + * If the temperature is higher than a trip point, |
21 | 21 | * a. if the trend is THERMAL_TREND_RAISING, use higher cooling |
22 | 22 | * state for this trip point |
23 | 23 | * b. if the trend is THERMAL_TREND_DROPPING, do nothing |
24 | | - * If the temperature is lower than a hysteresis temperature, |
| 24 | + * If the temperature is lower than a trip point, |
25 | 25 | * a. if the trend is THERMAL_TREND_RAISING, do nothing |
26 | 26 | * b. if the trend is THERMAL_TREND_DROPPING, use lower cooling |
27 | 27 | * state for this trip point, if the cooling state already |
@@ -74,35 +74,19 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, |
74 | 74 | int trip_id = thermal_zone_trip_id(tz, trip); |
75 | 75 | struct thermal_instance *instance; |
76 | 76 | bool throttle = false; |
77 | | - int hyst_temp; |
78 | 77 |
|
79 | 78 | if (tz->temperature >= trip_threshold) { |
80 | 79 | throttle = true; |
81 | 80 | trace_thermal_zone_trip(tz, trip_id, trip->type); |
82 | 81 | } |
83 | 82 |
|
84 | | - hyst_temp = trip->temperature - trip->hysteresis; |
85 | | - |
86 | | - dev_dbg(&tz->device, |
87 | | - "Trip%d[type=%d,temp=%d,hyst=%d]:trend=%d,throttle=%d\n", |
88 | | - trip_id, trip->type, trip->temperature, hyst_temp, trend, throttle); |
| 83 | + dev_dbg(&tz->device, "Trip%d[type=%d,temp=%d]:trend=%d,throttle=%d\n", |
| 84 | + trip_id, trip->type, trip_threshold, trend, throttle); |
89 | 85 |
|
90 | 86 | list_for_each_entry(instance, &td->thermal_instances, trip_node) { |
91 | 87 | int old_target; |
92 | 88 |
|
93 | 89 | old_target = instance->target; |
94 | | - throttle = false; |
95 | | - /* |
96 | | - * Lower the mitigation only if the temperature |
97 | | - * goes below the hysteresis temperature. |
98 | | - */ |
99 | | - if (tz->temperature >= trip->temperature || |
100 | | - (tz->temperature >= hyst_temp && |
101 | | - old_target == instance->upper)) { |
102 | | - throttle = true; |
103 | | - trace_thermal_zone_trip(tz, trip_id, trip->type); |
104 | | - } |
105 | | - |
106 | 90 | instance->target = get_target_state(instance, trend, throttle); |
107 | 91 |
|
108 | 92 | dev_dbg(&instance->cdev->device, "old_target=%d, target=%ld\n", |
|
0 commit comments