diff options
author | Zhang Rui <rui.zhang@intel.com> | 2013-02-08 01:52:06 -0500 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2013-03-26 02:33:50 -0400 |
commit | 57df8106932b57427df1eaaa13871857f75b1194 (patch) | |
tree | 031702338779869067dde6be83aedeee9e8d6e2b /drivers/thermal/cpu_cooling.c | |
parent | fc35b35cbe24ef021ea9acfba21e54da958df747 (diff) |
Thermal: exynos: fix cooling state translation
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Tested-by: Amit Daniel kachhap <amit.daniel@samsung.com>
Diffstat (limited to 'drivers/thermal/cpu_cooling.c')
-rw-r--r-- | drivers/thermal/cpu_cooling.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index 9e208d300647..e03891b03c9b 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c | |||
@@ -196,6 +196,17 @@ static int get_property(unsigned int cpu, unsigned long input, | |||
196 | return -EINVAL; | 196 | return -EINVAL; |
197 | } | 197 | } |
198 | 198 | ||
199 | unsigned long cpufreq_cooling_get_level(unsigned int cpu, unsigned int freq) | ||
200 | { | ||
201 | unsigned int val; | ||
202 | |||
203 | if (get_property(cpu, (unsigned long)freq, &val, GET_LEVEL)) | ||
204 | return THERMAL_CSTATE_INVALID; | ||
205 | return (unsigned long)val; | ||
206 | } | ||
207 | |||
208 | EXPORT_SYMBOL(cpufreq_cooling_get_level); | ||
209 | |||
199 | /** | 210 | /** |
200 | * get_cpu_frequency - get the absolute value of frequency from level. | 211 | * get_cpu_frequency - get the absolute value of frequency from level. |
201 | * @cpu: cpu for which frequency is fetched. | 212 | * @cpu: cpu for which frequency is fetched. |