From 57df8106932b57427df1eaaa13871857f75b1194 Mon Sep 17 00:00:00 2001 From: Zhang Rui Date: Fri, 8 Feb 2013 14:52:06 +0800 Subject: Thermal: exynos: fix cooling state translation Signed-off-by: Zhang Rui Tested-by: Amit Daniel kachhap --- include/linux/cpu_cooling.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux/cpu_cooling.h') diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h index 40b4ef54cc7d..bc479b1e0fd9 100644 --- a/include/linux/cpu_cooling.h +++ b/include/linux/cpu_cooling.h @@ -42,6 +42,8 @@ struct thermal_cooling_device *cpufreq_cooling_register( * @cdev: thermal cooling device pointer. */ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev); + +unsigned long cpufreq_cooling_get_level(unsigned int, unsigned int); #else /* !CONFIG_CPU_THERMAL */ static inline struct thermal_cooling_device *cpufreq_cooling_register( const struct cpumask *clip_cpus) @@ -53,6 +55,11 @@ static inline void cpufreq_cooling_unregister( { return; } +static inline unsigned long cpufreq_cooling_get_level(unsigned int, + unsigned int) +{ + return THERMAL_CSTATE_INVALID; +} #endif /* CONFIG_CPU_THERMAL */ #endif /* __CPU_COOLING_H__ */ -- cgit v1.2.3 From bbf7fc88c78f7317e2cdcf77e974c8a9a8312641 Mon Sep 17 00:00:00 2001 From: Zhang Rui Date: Tue, 26 Mar 2013 23:57:01 +0800 Subject: Thermal: build cpu_cooling code into thermal_sys module Signed-off-by: Zhang Rui Acked-by: Eduardo Valentin Acked-by: Durgadoss R --- drivers/thermal/Kconfig | 2 +- drivers/thermal/Makefile | 2 +- include/linux/cpu_cooling.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include/linux/cpu_cooling.h') diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index fb0672baff40..d1c2160492aa 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -67,7 +67,7 @@ config THERMAL_GOV_USER_SPACE Enable this to let the user space manage the platform thermals. config CPU_THERMAL - tristate "generic cpu cooling support" + bool "generic cpu cooling support" depends on CPU_FREQ select CPU_FREQ_TABLE help diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile index b17bfb055498..c054d410ac3f 100644 --- a/drivers/thermal/Makefile +++ b/drivers/thermal/Makefile @@ -11,7 +11,7 @@ thermal_sys-$(CONFIG_THERMAL_GOV_STEP_WISE) += step_wise.o thermal_sys-$(CONFIG_THERMAL_GOV_USER_SPACE) += user_space.o # cpufreq cooling -obj-$(CONFIG_CPU_THERMAL) += cpu_cooling.o +thermal_sys-$(CONFIG_CPU_THERMAL) += cpu_cooling.o # platform thermal drivers obj-$(CONFIG_SPEAR_THERMAL) += spear_thermal.o diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h index bc479b1e0fd9..77c87c9d0193 100644 --- a/include/linux/cpu_cooling.h +++ b/include/linux/cpu_cooling.h @@ -29,7 +29,7 @@ #define CPUFREQ_COOLING_START 0 #define CPUFREQ_COOLING_STOP 1 -#if defined(CONFIG_CPU_THERMAL) || defined(CONFIG_CPU_THERMAL_MODULE) +#ifdef CONFIG_CPU_THERMAL /** * cpufreq_cooling_register - function to create cpufreq cooling device. * @clip_cpus: cpumask of cpus where the frequency constraints will happen -- cgit v1.2.3 From 198f38f7fb2d0956cc3394655d03cdb7054b0dcd Mon Sep 17 00:00:00 2001 From: Eduardo Valentin Date: Wed, 24 Apr 2013 23:10:28 +0800 Subject: thermal: cpu_cooling: add needed header for cpu_cooling.h Update header list for cpu_cooling.h. Missing definition of cpumask. Signed-off-by: Eduardo Valentin Acked-by: Amit Daniel Kachhap Signed-off-by: Zhang Rui --- include/linux/cpu_cooling.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/cpu_cooling.h') diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h index 77c87c9d0193..75ef931fc4fc 100644 --- a/include/linux/cpu_cooling.h +++ b/include/linux/cpu_cooling.h @@ -25,6 +25,7 @@ #define __CPU_COOLING_H__ #include +#include #define CPUFREQ_COOLING_START 0 #define CPUFREQ_COOLING_STOP 1 -- cgit v1.2.3 From e44dec77be9e032ff9c2f95f17f7df3a55b58f60 Mon Sep 17 00:00:00 2001 From: Eduardo Valentin Date: Wed, 17 Apr 2013 17:12:22 +0000 Subject: thermal: cpu_cooling: remove unused symbols on cpu_cooling.h Remove defines that are not in used. Signed-off-by: Eduardo Valentin Acked-by: Amit Daniel Kachhap Signed-off-by: Zhang Rui --- include/linux/cpu_cooling.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/linux/cpu_cooling.h') diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h index 75ef931fc4fc..f48f6fbcd3be 100644 --- a/include/linux/cpu_cooling.h +++ b/include/linux/cpu_cooling.h @@ -27,9 +27,6 @@ #include #include -#define CPUFREQ_COOLING_START 0 -#define CPUFREQ_COOLING_STOP 1 - #ifdef CONFIG_CPU_THERMAL /** * cpufreq_cooling_register - function to create cpufreq cooling device. -- cgit v1.2.3 From d44ada516277f5d58b9bda2ea0a2c9503b316bbf Mon Sep 17 00:00:00 2001 From: Eduardo Valentin Date: Wed, 17 Apr 2013 17:12:23 +0000 Subject: thermal: cpu_cooling: improve line breaking To improve code readiness, change the way the lines are broken in this file. Signed-off-by: Eduardo Valentin Signed-off-by: Zhang Rui --- include/linux/cpu_cooling.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'include/linux/cpu_cooling.h') diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h index f48f6fbcd3be..282e27028418 100644 --- a/include/linux/cpu_cooling.h +++ b/include/linux/cpu_cooling.h @@ -32,8 +32,8 @@ * cpufreq_cooling_register - function to create cpufreq cooling device. * @clip_cpus: cpumask of cpus where the frequency constraints will happen */ -struct thermal_cooling_device *cpufreq_cooling_register( - const struct cpumask *clip_cpus); +struct thermal_cooling_device * +cpufreq_cooling_register(const struct cpumask *clip_cpus); /** * cpufreq_cooling_unregister - function to remove cpufreq cooling device. @@ -43,18 +43,18 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev); unsigned long cpufreq_cooling_get_level(unsigned int, unsigned int); #else /* !CONFIG_CPU_THERMAL */ -static inline struct thermal_cooling_device *cpufreq_cooling_register( - const struct cpumask *clip_cpus) +static inline struct thermal_cooling_device * +cpufreq_cooling_register(const struct cpumask *clip_cpus) { return NULL; } -static inline void cpufreq_cooling_unregister( - struct thermal_cooling_device *cdev) +static inline +void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev) { return; } -static inline unsigned long cpufreq_cooling_get_level(unsigned int, - unsigned int) +static inline +unsigned long cpufreq_cooling_get_level(unsigned int, unsigned int) { return THERMAL_CSTATE_INVALID; } -- cgit v1.2.3