thermal/drivers/imx: Use the thermal framework for the trip point
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 9 Mar 2023 09:28:21 +0000 (10:28 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Sat, 1 Apr 2023 18:51:45 +0000 (20:51 +0200)
commited4b51b8fd0bebfb4181a44c6458d8e3c07989b2
treef6e36497bb1e8910e05a64744a865c4e13d09353
parent53c9ce497dd79fb567214452f4cea5bb4c541b5e
thermal/drivers/imx: Use the thermal framework for the trip point

The thermal framework provides an API to get the trip related to a
trip point id. We want to consolidate the generic trip points code,
thus preventing the different drivers to deal with the trip points
after they registered them.

The set_trip_temp ops will be changed regarding the above changes but
first we need to rework a bit the different implementation in the
drivers.

The goal is to prevent using the trip id but use a trip point passed
as parameter which will contain all the needed information.

As we don't have the trip point passed as parameter yet, we get the
trip point using the generic trip thermal framewrok APIs and use it to
take exactly the same decisions.

The difference with this change and the previous code is from where we
get the thermal trip point (which is the same).

No functional change intended.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20230309092821.1590586-2-daniel.lezcano@linaro.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/imx_thermal.c