summaryrefslogtreecommitdiff
path: root/drivers/thermal/thermal_core.h
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2023-01-23 18:27:56 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-01-25 18:40:39 +0300
commit5b8de18ee9027c647db4c1905f7fd0550d17d67a (patch)
tree4c2d9299e7cbc912759f89ba3eb9840f01116de6 /drivers/thermal/thermal_core.h
parentb57d62862d171e402fca649882f0fec4e25bd312 (diff)
downloadlinux-5b8de18ee9027c647db4c1905f7fd0550d17d67a.tar.xz
thermal/core: Move the thermal trip code to a dedicated file
The thermal_core.c files contains a lot of functions handling different thermal components like the governors, the trip points, the cooling device, the OF cooling device, etc ... This organization does not help to migrate to a more sane code where there is a better self-encapsulation as all the components' internals can be directly accessed from a single file. For the sake of clarity, let's move the thermal trip points code in a dedicated thermal_trip.c file and add a function to browse all the trip points like we do with the thermal zones, the govenors and the cooling devices. The same can be done for the cooling devices and the governor code but that will come later as the current work in the thermal framework is to fix the trip point handling and use a generic trip point structure. No functional changes intended. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/thermal/thermal_core.h')
-rw-r--r--drivers/thermal/thermal_core.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
index 26350206a98d..7af54382e915 100644
--- a/drivers/thermal/thermal_core.h
+++ b/drivers/thermal/thermal_core.h
@@ -52,6 +52,10 @@ int for_each_thermal_cooling_device(int (*cb)(struct thermal_cooling_device *,
int for_each_thermal_governor(int (*cb)(struct thermal_governor *, void *),
void *thermal_governor);
+int __for_each_thermal_trip(struct thermal_zone_device *,
+ int (*cb)(struct thermal_trip *, void *),
+ void *);
+
struct thermal_zone_device *thermal_zone_get_by_id(int id);
struct thermal_attr {