cpufreq: Implement cpufreq_generic_suspend()
Multiple platforms need to set CPUs to a particular frequency before suspending the system, so provide a common infrastructure for them. Those platforms only need to point their ->suspend callback pointers to the generic routine. Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> [rjw: Changelog] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
2f0aea9363
commit
e28867eab7
@@ -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) {}
|
||||
|
Reference in New Issue
Block a user