aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/thermal.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/thermal.h')
-rw-r--r--include/linux/thermal.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 4cb3292fb6e4..a81c61521ba4 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -27,6 +27,7 @@
27 27
28#include <linux/idr.h> 28#include <linux/idr.h>
29#include <linux/device.h> 29#include <linux/device.h>
30#include <linux/workqueue.h>
30 31
31struct thermal_zone_device; 32struct thermal_zone_device;
32struct thermal_cooling_device; 33struct thermal_cooling_device;
@@ -58,6 +59,8 @@ struct thermal_zone_device_ops {
58 int (*get_trip_temp) (struct thermal_zone_device *, int, 59 int (*get_trip_temp) (struct thermal_zone_device *, int,
59 unsigned long *); 60 unsigned long *);
60 int (*get_crit_temp) (struct thermal_zone_device *, unsigned long *); 61 int (*get_crit_temp) (struct thermal_zone_device *, unsigned long *);
62 int (*notify) (struct thermal_zone_device *, int,
63 enum thermal_trip_type);
61}; 64};
62 65
63struct thermal_cooling_device_ops { 66struct thermal_cooling_device_ops {
@@ -104,11 +107,18 @@ struct thermal_zone_device {
104 struct device device; 107 struct device device;
105 void *devdata; 108 void *devdata;
106 int trips; 109 int trips;
110 int tc1;
111 int tc2;
112 int passive_delay;
113 int polling_delay;
114 int last_temperature;
115 bool passive;
107 struct thermal_zone_device_ops *ops; 116 struct thermal_zone_device_ops *ops;
108 struct list_head cooling_devices; 117 struct list_head cooling_devices;
109 struct idr idr; 118 struct idr idr;
110 struct mutex lock; /* protect cooling devices list */ 119 struct mutex lock; /* protect cooling devices list */
111 struct list_head node; 120 struct list_head node;
121 struct delayed_work poll_queue;
112#if defined(CONFIG_THERMAL_HWMON) 122#if defined(CONFIG_THERMAL_HWMON)
113 struct list_head hwmon_node; 123 struct list_head hwmon_node;
114 struct thermal_hwmon_device *hwmon; 124 struct thermal_hwmon_device *hwmon;
@@ -120,13 +130,16 @@ struct thermal_zone_device {
120struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, 130struct thermal_zone_device *thermal_zone_device_register(char *, int, void *,
121 struct 131 struct
122 thermal_zone_device_ops 132 thermal_zone_device_ops
123 *); 133 *, int tc1, int tc2,
134 int passive_freq,
135 int polling_freq);
124void thermal_zone_device_unregister(struct thermal_zone_device *); 136void thermal_zone_device_unregister(struct thermal_zone_device *);
125 137
126int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, 138int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int,
127 struct thermal_cooling_device *); 139 struct thermal_cooling_device *);
128int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, 140int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int,
129 struct thermal_cooling_device *); 141 struct thermal_cooling_device *);
142void thermal_zone_device_update(struct thermal_zone_device *);
130struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, 143struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
131 struct 144 struct
132 thermal_cooling_device_ops 145 thermal_cooling_device_ops