aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEduardo Valentin <eduardo.valentin@ti.com>2013-09-26 15:55:01 -0400
committerAlex Shi <alex.shi@linaro.org>2014-03-31 15:47:20 +0800
commit0b8714893ca2e372272b135fc6b1b6282859b17b (patch)
tree93722c77a21c1e58780898c56b1379bec2cba469 /include
parent1c762edb2ae05c5796be9e0ed8f3263e3d8f4a20 (diff)
thermal: core: introduce thermal_of_cooling_device_register
This patch adds a new API to allow registering cooling devices in the thermal framework derived from device tree nodes. This API links the cooling device with the device tree node so that binding with thermal zones is possible, given that thermal zones are pointing to cooling device device tree nodes. Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> (cherry picked from commit a116b5d44f144586ef03a93f14ddc63f4a85e906) Signed-off-by: Alex Shi <alex.shi@linaro.org> Conflicts: drivers/thermal/thermal_core.c
Diffstat (limited to 'include')
-rw-r--r--include/linux/thermal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index bd2533bd16c..55fce47b009 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -25,6 +25,7 @@
#ifndef __THERMAL_H__
#define __THERMAL_H__
+#include <linux/of.h>
#include <linux/idr.h>
#include <linux/device.h>
#include <linux/workqueue.h>
@@ -270,6 +271,9 @@ void thermal_zone_device_update(struct thermal_zone_device *);
struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
const struct thermal_cooling_device_ops *);
+struct thermal_cooling_device *
+thermal_of_cooling_device_register(struct device_node *np, char *, void *,
+ const struct thermal_cooling_device_ops *);
void thermal_cooling_device_unregister(struct thermal_cooling_device *);
struct thermal_zone_device *thermal_zone_get_zone_by_name(const char *name);
int thermal_zone_get_temp(struct thermal_zone_device *tz, unsigned long *temp);