summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorviresh kumar <viresh.kumar@linaro.org>2014-03-04 11:00:27 +0800
committerNishanth Menon <nm@ti.com>2014-07-28 08:07:31 -0500
commit9db77d156bdf00997829729022707ec876868d65 (patch)
tree1443ef689b33029e166e8dd444196a3496ecb100 /include
parent9e9d0fc1c45716af973fd73c6a205c35d3685fa8 (diff)
cpufreq: Implement cpufreq_generic_suspend()
[ Upstream commit e28867eab7c0a60cddf0cb59f9f6cbbd9561425d ] Multiple platforms need to set CPU to a particular frequency before suspending system. And so they need a common infrastructure which is provided by this patch. Those platforms just need to initialize their ->suspend() pointers with the generic routine. Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/cpufreq.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index ef42824cbe5..a8d9f5870c2 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -74,6 +74,8 @@ struct cpufreq_policy {
unsigned int max; /* in kHz */
unsigned int cur; /* in kHz, only needed if cpufreq
* governors are used */
+ unsigned int suspend_freq; /* freq to set during suspend */
+
unsigned int policy; /* see above */
struct cpufreq_governor *governor; /* see below */
void *governor_data;
@@ -299,6 +301,7 @@ cpufreq_verify_within_cpu_limits(struct cpufreq_policy *policy)
#ifdef CONFIG_CPU_FREQ
void cpufreq_suspend(void);
void cpufreq_resume(void);
+int cpufreq_generic_suspend(struct cpufreq_policy *policy);
#else
static inline void cpufreq_suspend(void) {}
static inline void cpufreq_resume(void) {}