summaryrefslogtreecommitdiff
path: root/drivers/thermal/thermal_core.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-04-10 19:08:12 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-04-23 21:38:41 +0300
commit976f44133f76eb24becdf3336d832eb3c720b458 (patch)
tree57ce30b0975d7b8081a54bdf37d4e287f1ac2157 /drivers/thermal/thermal_core.c
parent0ae204a667452e58a1e5081c18a179e557df33c8 (diff)
downloadlinux-976f44133f76eb24becdf3336d832eb3c720b458.tar.xz
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>
Diffstat (limited to 'drivers/thermal/thermal_core.c')
-rw-r--r--drivers/thermal/thermal_core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 62fe062d7ff5..221e1924240d 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -516,6 +516,9 @@ void __thermal_zone_device_update(struct thermal_zone_device *tz,
governor->trip_crossed(tz, &td->trip, false);
}
+ if (governor->manage)
+ governor->manage(tz);
+
monitor_thermal_zone(tz);
}