aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2013-04-14 21:26:58 -0400
committerZhang Rui <rui.zhang@intel.com>2013-04-14 21:26:58 -0400
commitd13cb03aef0c062dcdd16b411bd4c02c1574ff08 (patch)
tree0ee1d535ddf0ca49cd88484f042d12996f689e1c /include/linux
parent2fd1db8819fbf73b5f74b4b4a205ab7be0957944 (diff)
parentbbf7fc88c78f7317e2cdcf77e974c8a9a8312641 (diff)
Merge branch 'thermal' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux into next
Conflicts: drivers/thermal/cpu_cooling.c
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cpu_cooling.h9
-rw-r--r--include/linux/thermal.h9
2 files changed, 12 insertions, 6 deletions
diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h
index 40b4ef54cc7d..77c87c9d0193 100644
--- a/include/linux/cpu_cooling.h
+++ b/include/linux/cpu_cooling.h
@@ -29,7 +29,7 @@
29#define CPUFREQ_COOLING_START 0 29#define CPUFREQ_COOLING_START 0
30#define CPUFREQ_COOLING_STOP 1 30#define CPUFREQ_COOLING_STOP 1
31 31
32#if defined(CONFIG_CPU_THERMAL) || defined(CONFIG_CPU_THERMAL_MODULE) 32#ifdef CONFIG_CPU_THERMAL
33/** 33/**
34 * cpufreq_cooling_register - function to create cpufreq cooling device. 34 * cpufreq_cooling_register - function to create cpufreq cooling device.
35 * @clip_cpus: cpumask of cpus where the frequency constraints will happen 35 * @clip_cpus: cpumask of cpus where the frequency constraints will happen
@@ -42,6 +42,8 @@ struct thermal_cooling_device *cpufreq_cooling_register(
42 * @cdev: thermal cooling device pointer. 42 * @cdev: thermal cooling device pointer.
43 */ 43 */
44void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev); 44void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev);
45
46unsigned long cpufreq_cooling_get_level(unsigned int, unsigned int);
45#else /* !CONFIG_CPU_THERMAL */ 47#else /* !CONFIG_CPU_THERMAL */
46static inline struct thermal_cooling_device *cpufreq_cooling_register( 48static inline struct thermal_cooling_device *cpufreq_cooling_register(
47 const struct cpumask *clip_cpus) 49 const struct cpumask *clip_cpus)
@@ -53,6 +55,11 @@ static inline void cpufreq_cooling_unregister(
53{ 55{
54 return; 56 return;
55} 57}
58static inline unsigned long cpufreq_cooling_get_level(unsigned int,
59 unsigned int)
60{
61 return THERMAL_CSTATE_INVALID;
62}
56#endif /* CONFIG_CPU_THERMAL */ 63#endif /* CONFIG_CPU_THERMAL */
57 64
58#endif /* __CPU_COOLING_H__ */ 65#endif /* __CPU_COOLING_H__ */
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index fd7b8f3e6f42..3bda306f7a50 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 */
@@ -244,9 +246,6 @@ struct thermal_instance *get_thermal_instance(struct thermal_zone_device *,
244void thermal_cdev_update(struct thermal_cooling_device *); 246void thermal_cdev_update(struct thermal_cooling_device *);
245void notify_thermal_framework(struct thermal_zone_device *, int); 247void notify_thermal_framework(struct thermal_zone_device *, int);
246 248
247int thermal_register_governor(struct thermal_governor *);
248void thermal_unregister_governor(struct thermal_governor *);
249
250#ifdef CONFIG_NET 249#ifdef CONFIG_NET
251extern int thermal_generate_netlink_event(struct thermal_zone_device *tz, 250extern int thermal_generate_netlink_event(struct thermal_zone_device *tz,
252 enum events event); 251 enum events event);