summaryrefslogtreecommitdiff
path: root/include/linux/devfreq_cooling.h
diff options
context:
space:
mode:
authorLukasz Luba <lukasz.luba@arm.com>2020-12-10 17:30:12 +0300
committerDaniel Lezcano <daniel.lezcano@linaro.org>2020-12-11 16:10:44 +0300
commit84e0d87c9944eb36ae6037af5cb6905f67c074c5 (patch)
tree08e3524fc59309c0ba12e95af3cb1d78ab449021 /include/linux/devfreq_cooling.h
parent229794eee27fddbedd03be5f8b20375a2637ff48 (diff)
downloadlinux-84e0d87c9944eb36ae6037af5cb6905f67c074c5.tar.xz
thermal: devfreq_cooling: add new registration functions with Energy Model
The Energy Model (EM) framework supports devices such as Devfreq. Create new registration function which automatically register EM for the thermal devfreq_cooling devices. This patch prepares the code for coming changes which are going to replace old power model with the new EM. Reviewed-by: Ionela Voinescu <ionela.voinescu@arm.com> Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201210143014.24685-4-lukasz.luba@arm.com
Diffstat (limited to 'include/linux/devfreq_cooling.h')
-rw-r--r--include/linux/devfreq_cooling.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/devfreq_cooling.h b/include/linux/devfreq_cooling.h
index 9df2dfca68dd..7a9fbcc7b265 100644
--- a/include/linux/devfreq_cooling.h
+++ b/include/linux/devfreq_cooling.h
@@ -65,6 +65,9 @@ struct thermal_cooling_device *
of_devfreq_cooling_register(struct device_node *np, struct devfreq *df);
struct thermal_cooling_device *devfreq_cooling_register(struct devfreq *df);
void devfreq_cooling_unregister(struct thermal_cooling_device *dfc);
+struct thermal_cooling_device *
+devfreq_cooling_em_register(struct devfreq *df,
+ struct devfreq_cooling_power *dfc_power);
#else /* !CONFIG_DEVFREQ_THERMAL */
@@ -87,6 +90,13 @@ devfreq_cooling_register(struct devfreq *df)
return ERR_PTR(-EINVAL);
}
+static inline struct thermal_cooling_device *
+devfreq_cooling_em_register(struct devfreq *df,
+ struct devfreq_cooling_power *dfc_power)
+{
+ return ERR_PTR(-EINVAL);
+}
+
static inline void
devfreq_cooling_unregister(struct thermal_cooling_device *dfc)
{