Skip to content

Commit 0e2d9b4

Browse files
committed
Revert "drivers: thermal: step_wise: add support for hysteresis"
This reverts commit cef4ba0.
1 parent 00ecb85 commit 0e2d9b4

1 file changed

Lines changed: 4 additions & 20 deletions

File tree

drivers/thermal/gov_step_wise.c

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
#include "thermal_core.h"
1818

1919
/*
20-
* If the temperature is higher than a hysteresis temperature,
20+
* If the temperature is higher than a trip point,
2121
* a. if the trend is THERMAL_TREND_RAISING, use higher cooling
2222
* state for this trip point
2323
* 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,
2525
* a. if the trend is THERMAL_TREND_RAISING, do nothing
2626
* b. if the trend is THERMAL_TREND_DROPPING, use lower cooling
2727
* 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,
7474
int trip_id = thermal_zone_trip_id(tz, trip);
7575
struct thermal_instance *instance;
7676
bool throttle = false;
77-
int hyst_temp;
7877

7978
if (tz->temperature >= trip_threshold) {
8079
throttle = true;
8180
trace_thermal_zone_trip(tz, trip_id, trip->type);
8281
}
8382

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);
8985

9086
list_for_each_entry(instance, &td->thermal_instances, trip_node) {
9187
int old_target;
9288

9389
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-
10690
instance->target = get_target_state(instance, trend, throttle);
10791

10892
dev_dbg(&instance->cdev->device, "old_target=%d, target=%ld\n",

0 commit comments

Comments
 (0)