thermal: core: Introduce .manage() callback for thermal governors
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 10 Apr 2024 16:08:12 +0000 (18:08 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 23 Apr 2024 18:38:41 +0000 (20:38 +0200)
commit976f44133f76eb24becdf3336d832eb3c720b458
tree57ce30b0975d7b8081a54bdf37d4e287f1ac2157
parent0ae204a667452e58a1e5081c18a179e557df33c8
thermal: core: Introduce .manage() callback for thermal governors

Introduce a new thermal governor callback called .manage() that will be
invoked once per thermal zone update after processing all of the trip
points in the core.

This will allow governors that look at multiple trip points together
to check all of them in a consistent configuration, so they don't need
to play tricks with skipping .throttle() invocations that they are not
interested in and they can avoid carrying out the same computations for
multiple times in one cycle.

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