thermal: trip: Make thermal_zone_set_trips() use trip thresholds
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 28 May 2024 16:51:11 +0000 (18:51 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 11 Jun 2024 19:04:56 +0000 (21:04 +0200)
commit893bae92237d824334d68d6b67222aaf32e41458
treebd4fa9b9af1bb502fbd97d6a12fd2931b48d9c4f
parent28d5cc12671c8b23d928128d8d4ced586b873e5f
thermal: trip: Make thermal_zone_set_trips() use trip thresholds

Modify thermal_zone_set_trips() to use trip thresholds instead of
computing the low temperature for each trip to avoid deriving both
the high and low temperature levels from the same trip (which may
happen if the zone temperature falls into the hysteresis range of
one trip).

Accordingly, make __thermal_zone_device_update() call
thermal_zone_set_trips() later, when threshold values have been
updated for all trips.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/thermal_core.c
drivers/thermal/thermal_trip.c