thermal/core: Move the thermal trip code to a dedicated file
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 23 Jan 2023 15:27:56 +0000 (16:27 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 25 Jan 2023 15:40:39 +0000 (16:40 +0100)
commit5b8de18ee9027c647db4c1905f7fd0550d17d67a
tree4c2d9299e7cbc912759f89ba3eb9840f01116de6
parentb57d62862d171e402fca649882f0fec4e25bd312
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>
drivers/thermal/Makefile
drivers/thermal/thermal_core.c
drivers/thermal/thermal_core.h
drivers/thermal/thermal_helpers.c
drivers/thermal/thermal_trip.c [new file with mode: 0644]