aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/thermal.h
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@collabora.com>2020-06-29 14:29:20 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2020-06-29 20:26:36 +0200
commitac5d9ecc74d8beee8c87f1441e4adaf4e9fe90c5 (patch)
tree6bf1c0736ad4b083d97520cfec22970f2b30d037 /include/linux/thermal.h
parentthermal: remove get_mode() operation of drivers (diff)
downloadlinux-dev-ac5d9ecc74d8beee8c87f1441e4adaf4e9fe90c5.tar.xz
linux-dev-ac5d9ecc74d8beee8c87f1441e4adaf4e9fe90c5.zip
thermal: Add mode helpers
Prepare for making the drivers not access tzd's private members. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> [staticize thermal_zone_device_set_mode()] Signed-off-by: kernel test robot <lkp@intel.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20200629122925.21729-7-andrzej.p@collabora.com
Diffstat (limited to 'include/linux/thermal.h')
-rw-r--r--include/linux/thermal.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index a808f6fa2777..df013c39ba9b 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -416,6 +416,9 @@ int thermal_zone_get_offset(struct thermal_zone_device *tz);
void thermal_cdev_update(struct thermal_cooling_device *);
void thermal_notify_framework(struct thermal_zone_device *, int);
+int thermal_zone_device_enable(struct thermal_zone_device *tz);
+int thermal_zone_device_disable(struct thermal_zone_device *tz);
+int thermal_zone_device_is_enabled(struct thermal_zone_device *tz);
#else
static inline struct thermal_zone_device *thermal_zone_device_register(
const char *type, int trips, int mask, void *devdata,
@@ -463,6 +466,16 @@ static inline void thermal_cdev_update(struct thermal_cooling_device *cdev)
static inline void thermal_notify_framework(struct thermal_zone_device *tz,
int trip)
{ }
+
+static inline int thermal_zone_device_enable(struct thermal_zone_device *tz)
+{ return -ENODEV; }
+
+static inline int thermal_zone_device_disable(struct thermal_zone_device *tz)
+{ return -ENODEV; }
+
+static inline int
+thermal_zone_device_is_enabled(struct thermal_zone_device *tz)
+{ return -ENODEV; }
#endif /* CONFIG_THERMAL */
#endif /* __THERMAL_H__ */