diff options
Diffstat (limited to 'include/linux/thermal.h')
-rw-r--r-- | include/linux/thermal.h | 15 |
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 | ||
31 | struct thermal_zone_device; | 32 | struct thermal_zone_device; |
32 | struct thermal_cooling_device; | 33 | struct 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 | ||
63 | struct thermal_cooling_device_ops { | 66 | struct 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 { | |||
120 | struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, | 130 | struct 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); | ||
124 | void thermal_zone_device_unregister(struct thermal_zone_device *); | 136 | void thermal_zone_device_unregister(struct thermal_zone_device *); |
125 | 137 | ||
126 | int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, | 138 | int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, |
127 | struct thermal_cooling_device *); | 139 | struct thermal_cooling_device *); |
128 | int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, | 140 | int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, |
129 | struct thermal_cooling_device *); | 141 | struct thermal_cooling_device *); |
142 | void thermal_zone_device_update(struct thermal_zone_device *); | ||
130 | struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, | 143 | struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, |
131 | struct | 144 | struct |
132 | thermal_cooling_device_ops | 145 | thermal_cooling_device_ops |