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, 8 insertions, 7 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index e3c0ae9bb1fa..a386a1cbb6e1 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -33,8 +33,11 @@
33#define THERMAL_MAX_TRIPS 12 33#define THERMAL_MAX_TRIPS 12
34#define THERMAL_NAME_LENGTH 20 34#define THERMAL_NAME_LENGTH 20
35 35
36/* invalid cooling state */
37#define THERMAL_CSTATE_INVALID -1UL
38
36/* No upper/lower limit requirement */ 39/* No upper/lower limit requirement */
37#define THERMAL_NO_LIMIT -1UL 40#define THERMAL_NO_LIMIT THERMAL_CSTATE_INVALID
38 41
39/* Unit conversion macros */ 42/* Unit conversion macros */
40#define KELVIN_TO_CELSIUS(t) (long)(((long)t-2732 >= 0) ? \ 43#define KELVIN_TO_CELSIUS(t) (long)(((long)t-2732 >= 0) ? \
@@ -184,7 +187,6 @@ struct thermal_governor {
184 char name[THERMAL_NAME_LENGTH]; 187 char name[THERMAL_NAME_LENGTH];
185 int (*throttle)(struct thermal_zone_device *tz, int trip); 188 int (*throttle)(struct thermal_zone_device *tz, int trip);
186 struct list_head governor_list; 189 struct list_head governor_list;
187 struct module *owner;
188}; 190};
189 191
190/* Structure that holds binding parameters for a zone */ 192/* Structure that holds binding parameters for a zone */
@@ -237,21 +239,20 @@ void thermal_zone_device_update(struct thermal_zone_device *);
237struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, 239struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
238 const struct thermal_cooling_device_ops *); 240 const struct thermal_cooling_device_ops *);
239void thermal_cooling_device_unregister(struct thermal_cooling_device *); 241void thermal_cooling_device_unregister(struct thermal_cooling_device *);
242struct thermal_zone_device *thermal_zone_get_zone_by_name(const char *name);
243int thermal_zone_get_temp(struct thermal_zone_device *tz, unsigned long *temp);
240 244
241int get_tz_trend(struct thermal_zone_device *, int); 245int get_tz_trend(struct thermal_zone_device *, int);
242struct thermal_instance *get_thermal_instance(struct thermal_zone_device *, 246struct thermal_instance *get_thermal_instance(struct thermal_zone_device *,
243 struct thermal_cooling_device *, int); 247 struct thermal_cooling_device *, int);
244void thermal_cdev_update(struct thermal_cooling_device *); 248void thermal_cdev_update(struct thermal_cooling_device *);
245void notify_thermal_framework(struct thermal_zone_device *, int); 249void thermal_notify_framework(struct thermal_zone_device *, int);
246
247int thermal_register_governor(struct thermal_governor *);
248void thermal_unregister_governor(struct thermal_governor *);
249 250
250#ifdef CONFIG_NET 251#ifdef CONFIG_NET
251extern int thermal_generate_netlink_event(struct thermal_zone_device *tz, 252extern int thermal_generate_netlink_event(struct thermal_zone_device *tz,
252 enum events event); 253 enum events event);
253#else 254#else
254static int thermal_generate_netlink_event(struct thermal_zone_device *tz, 255static inline int thermal_generate_netlink_event(struct thermal_zone_device *tz,
255 enum events event) 256 enum events event)
256{ 257{
257 return 0; 258 return 0;