thermal: core: Introduce .trip_crossed() callback for thermal governors
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 10 Apr 2024 16:10:53 +0000 (18:10 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 19 Apr 2024 20:11:06 +0000 (22:11 +0200)
commit80f5fd45c764816fe9dbe8e94bd2677b4a8a3f4d
treef30f73116a84a95d756f72443371dd165a715032
parent5c897a9a1237155822183b8979005d06c14a996a
thermal: core: Introduce .trip_crossed() callback for thermal governors

Introduce a new thermal governor callback called .trip_crossed()
that will be invoked whenever a trip point is crossed by the zone
temperature, either on the way up or on the way down.

The trip crossing direction information will be passed to it and if
multiple trips are crossed in the same direction during one thermal zone
update, the new callback will be invoked for them in temperature order,
either ascending or descending, depending on the trip crossing
direction.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
drivers/thermal/thermal_core.c
drivers/thermal/thermal_core.h