I don't have a working build environment currently. But something like
diff --git a/drivers/thermal/gov_step_wise.c b/drivers/thermal/gov_step_wise.c index eefeb6407d0f..904a66c9e499 100644 --- a/drivers/thermal/gov_step_wise.c +++ b/drivers/thermal/gov_step_wise.c @@ -99,12 +99,15 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip_id }
hyst_temp = trip_temp = trip.temperature; - if (tz->ops->get_trip_hyst) { - tz->ops->get_trip_hyst(tz, trip_id, &hyst_temp); - hyst_temp = trip_temp - hyst_temp; - } trip_type = trip.type;
+ if (trip.hysteresis) + hyst_temp = trip_temp - trip.hysteresis; + else + dev_info_once(&tz->device, + "Zero hysteresis value for Trip%d[type=%d]\n", + trip_id, trip_type); + dev_dbg(&tz->device, "Trip%d[type=%d,temp=%d,hyst=%d]:trend=%d,throttle=%d\n", trip_id, trip_type, trip.temperature, hyst_temp, trend, throttle); --
probably will fix the hysteresis issue. This should read the values from the trip tables directly (just like, e.g., in gov_bang_bang.c).
I don't have a working build environment currently. But something like
diff --git a/drivers/ thermal/ gov_step_ wise.c b/drivers/ thermal/ gov_step_ wise.c .904a66c9e499 100644 thermal/ gov_step_ wise.c thermal/ gov_step_ wise.c zone_trip_ update( struct thermal_zone_device *tz, int trip_id
index eefeb6407d0f.
--- a/drivers/
+++ b/drivers/
@@ -99,12 +99,15 @@ static void thermal_
}
hyst_temp = trip_temp = trip.temperature; >get_trip_ hyst) { >get_trip_ hyst(tz, trip_id, &hyst_temp);
- if (tz->ops-
- tz->ops-
- hyst_temp = trip_temp - hyst_temp;
- }
trip_type = trip.type;
+ if (trip.hysteresis) once(&tz- >device, &tz->device, d[type= %d,temp= %d,hyst= %d]:trend= %d,throttle= %d\n",
+ hyst_temp = trip_temp - trip.hysteresis;
+ else
+ dev_info_
+ "Zero hysteresis value for Trip%d[type=%d]\n",
+ trip_id, trip_type);
+
dev_dbg(
"Trip%
trip_id, trip_type, trip.temperature, hyst_temp, trend, throttle);
--
probably will fix the hysteresis issue. This should read the values from the trip tables directly (just like, e.g., in gov_bang_bang.c).