aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cpufreq.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/cpufreq.h')
-rw-r--r--include/linux/cpufreq.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 4d89e0e6f9cc..2d2e62c8666a 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -74,6 +74,8 @@ struct cpufreq_policy {
74 unsigned int max; /* in kHz */ 74 unsigned int max; /* in kHz */
75 unsigned int cur; /* in kHz, only needed if cpufreq 75 unsigned int cur; /* in kHz, only needed if cpufreq
76 * governors are used */ 76 * governors are used */
77 unsigned int suspend_freq; /* freq to set during suspend */
78
77 unsigned int policy; /* see above */ 79 unsigned int policy; /* see above */
78 struct cpufreq_governor *governor; /* see below */ 80 struct cpufreq_governor *governor; /* see below */
79 void *governor_data; 81 void *governor_data;
@@ -83,6 +85,7 @@ struct cpufreq_policy {
83 * called, but you're in IRQ context */ 85 * called, but you're in IRQ context */
84 86
85 struct cpufreq_real_policy user_policy; 87 struct cpufreq_real_policy user_policy;
88 struct cpufreq_frequency_table *freq_table;
86 89
87 struct list_head policy_list; 90 struct list_head policy_list;
88 struct kobject kobj; 91 struct kobject kobj;
@@ -224,6 +227,7 @@ struct cpufreq_driver {
224 int (*bios_limit) (int cpu, unsigned int *limit); 227 int (*bios_limit) (int cpu, unsigned int *limit);
225 228
226 int (*exit) (struct cpufreq_policy *policy); 229 int (*exit) (struct cpufreq_policy *policy);
230 void (*stop_cpu) (struct cpufreq_policy *policy);
227 int (*suspend) (struct cpufreq_policy *policy); 231 int (*suspend) (struct cpufreq_policy *policy);
228 int (*resume) (struct cpufreq_policy *policy); 232 int (*resume) (struct cpufreq_policy *policy);
229 struct freq_attr **attr; 233 struct freq_attr **attr;
@@ -296,6 +300,15 @@ cpufreq_verify_within_cpu_limits(struct cpufreq_policy *policy)
296 policy->cpuinfo.max_freq); 300 policy->cpuinfo.max_freq);
297} 301}
298 302
303#ifdef CONFIG_CPU_FREQ
304void cpufreq_suspend(void);
305void cpufreq_resume(void);
306int cpufreq_generic_suspend(struct cpufreq_policy *policy);
307#else
308static inline void cpufreq_suspend(void) {}
309static inline void cpufreq_resume(void) {}
310#endif
311
299/********************************************************************* 312/*********************************************************************
300 * CPUFREQ NOTIFIER INTERFACE * 313 * CPUFREQ NOTIFIER INTERFACE *
301 *********************************************************************/ 314 *********************************************************************/
@@ -306,8 +319,6 @@ cpufreq_verify_within_cpu_limits(struct cpufreq_policy *policy)
306/* Transition notifiers */ 319/* Transition notifiers */
307#define CPUFREQ_PRECHANGE (0) 320#define CPUFREQ_PRECHANGE (0)
308#define CPUFREQ_POSTCHANGE (1) 321#define CPUFREQ_POSTCHANGE (1)
309#define CPUFREQ_RESUMECHANGE (8)
310#define CPUFREQ_SUSPENDCHANGE (9)
311 322
312/* Policy Notifiers */ 323/* Policy Notifiers */
313#define CPUFREQ_ADJUST (0) 324#define CPUFREQ_ADJUST (0)
@@ -463,7 +474,6 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy,
463int cpufreq_frequency_table_get_index(struct cpufreq_policy *policy, 474int cpufreq_frequency_table_get_index(struct cpufreq_policy *policy,
464 unsigned int freq); 475 unsigned int freq);
465 476
466void cpufreq_frequency_table_update_policy_cpu(struct cpufreq_policy *policy);
467ssize_t cpufreq_show_cpus(const struct cpumask *mask, char *buf); 477ssize_t cpufreq_show_cpus(const struct cpumask *mask, char *buf);
468 478
469#ifdef CONFIG_CPU_FREQ 479#ifdef CONFIG_CPU_FREQ
@@ -490,9 +500,6 @@ struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu);
490/* the following are really really optional */ 500/* the following are really really optional */
491extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs; 501extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs;
492extern struct freq_attr *cpufreq_generic_attr[]; 502extern struct freq_attr *cpufreq_generic_attr[];
493void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table,
494 unsigned int cpu);
495void cpufreq_frequency_table_put_attr(unsigned int cpu);
496int cpufreq_table_validate_and_show(struct cpufreq_policy *policy, 503int cpufreq_table_validate_and_show(struct cpufreq_policy *policy,
497 struct cpufreq_frequency_table *table); 504 struct cpufreq_frequency_table *table);
498 505
@@ -500,10 +507,4 @@ unsigned int cpufreq_generic_get(unsigned int cpu);
500int cpufreq_generic_init(struct cpufreq_policy *policy, 507int cpufreq_generic_init(struct cpufreq_policy *policy,
501 struct cpufreq_frequency_table *table, 508 struct cpufreq_frequency_table *table,
502 unsigned int transition_latency); 509 unsigned int transition_latency);
503static inline int cpufreq_generic_exit(struct cpufreq_policy *policy)
504{
505 cpufreq_frequency_table_put_attr(policy->cpu);
506 return 0;
507}
508
509#endif /* _LINUX_CPUFREQ_H */ 510#endif /* _LINUX_CPUFREQ_H */