diff options
author | Zhang Rui <rui.zhang@intel.com> | 2013-04-14 21:26:58 -0400 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2013-04-14 21:26:58 -0400 |
commit | d13cb03aef0c062dcdd16b411bd4c02c1574ff08 (patch) | |
tree | 0ee1d535ddf0ca49cd88484f042d12996f689e1c /include/linux | |
parent | 2fd1db8819fbf73b5f74b4b4a205ab7be0957944 (diff) | |
parent | bbf7fc88c78f7317e2cdcf77e974c8a9a8312641 (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.h | 9 | ||||
-rw-r--r-- | include/linux/thermal.h | 9 |
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 | */ |
44 | void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev); | 44 | void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev); |
45 | |||
46 | unsigned long cpufreq_cooling_get_level(unsigned int, unsigned int); | ||
45 | #else /* !CONFIG_CPU_THERMAL */ | 47 | #else /* !CONFIG_CPU_THERMAL */ |
46 | static inline struct thermal_cooling_device *cpufreq_cooling_register( | 48 | static 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 | } |
58 | static 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 *, | |||
244 | void thermal_cdev_update(struct thermal_cooling_device *); | 246 | void thermal_cdev_update(struct thermal_cooling_device *); |
245 | void notify_thermal_framework(struct thermal_zone_device *, int); | 247 | void notify_thermal_framework(struct thermal_zone_device *, int); |
246 | 248 | ||
247 | int thermal_register_governor(struct thermal_governor *); | ||
248 | void thermal_unregister_governor(struct thermal_governor *); | ||
249 | |||
250 | #ifdef CONFIG_NET | 249 | #ifdef CONFIG_NET |
251 | extern int thermal_generate_netlink_event(struct thermal_zone_device *tz, | 250 | extern int thermal_generate_netlink_event(struct thermal_zone_device *tz, |
252 | enum events event); | 251 | enum events event); |