Skip to content

Commit

Permalink
Fix hysteresis support in gov_step_wise.c
Browse files Browse the repository at this point in the history
Signed-off-by: Jürgen Kreileder <[email protected]>
  • Loading branch information
jkreileder committed Nov 23, 2023
1 parent a579894 commit ffbba83
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/thermal/gov_step_wise.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,10 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip_id
trace_thermal_zone_trip(tz, trip_id, trip.type);
}

hyst_temp = trip_temp = trip.temperature;
trip_temp = trip.temperature;
hyst_temp = trip_temp - trip.hysteresis;
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);
Expand Down

0 comments on commit ffbba83

Please sign in to comment.