Comment 14 for bug 2041741

Revision history for this message
Jürgen Kreileder (jk) wrote :

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).