diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/cpufreq.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index a22944ca0526..037d36ae63e5 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
| @@ -106,6 +106,7 @@ struct cpufreq_policy { | |||
| 106 | * governors are used */ | 106 | * governors are used */ |
| 107 | unsigned int policy; /* see above */ | 107 | unsigned int policy; /* see above */ |
| 108 | struct cpufreq_governor *governor; /* see below */ | 108 | struct cpufreq_governor *governor; /* see below */ |
| 109 | void *governor_data; | ||
| 109 | 110 | ||
| 110 | struct work_struct update; /* if update_policy() needs to be | 111 | struct work_struct update; /* if update_policy() needs to be |
| 111 | * called, but you're in IRQ context */ | 112 | * called, but you're in IRQ context */ |
| @@ -178,9 +179,11 @@ static inline unsigned long cpufreq_scale(unsigned long old, u_int div, u_int mu | |||
| 178 | * CPUFREQ GOVERNORS * | 179 | * CPUFREQ GOVERNORS * |
| 179 | *********************************************************************/ | 180 | *********************************************************************/ |
| 180 | 181 | ||
| 181 | #define CPUFREQ_GOV_START 1 | 182 | #define CPUFREQ_GOV_START 1 |
| 182 | #define CPUFREQ_GOV_STOP 2 | 183 | #define CPUFREQ_GOV_STOP 2 |
| 183 | #define CPUFREQ_GOV_LIMITS 3 | 184 | #define CPUFREQ_GOV_LIMITS 3 |
| 185 | #define CPUFREQ_GOV_POLICY_INIT 4 | ||
| 186 | #define CPUFREQ_GOV_POLICY_EXIT 5 | ||
| 184 | 187 | ||
| 185 | struct cpufreq_governor { | 188 | struct cpufreq_governor { |
| 186 | char name[CPUFREQ_NAME_LEN]; | 189 | char name[CPUFREQ_NAME_LEN]; |
| @@ -229,6 +232,13 @@ struct cpufreq_driver { | |||
| 229 | struct module *owner; | 232 | struct module *owner; |
| 230 | char name[CPUFREQ_NAME_LEN]; | 233 | char name[CPUFREQ_NAME_LEN]; |
| 231 | u8 flags; | 234 | u8 flags; |
| 235 | /* | ||
| 236 | * This should be set by platforms having multiple clock-domains, i.e. | ||
| 237 | * supporting multiple policies. With this sysfs directories of governor | ||
| 238 | * would be created in cpu/cpu<num>/cpufreq/ directory and so they can | ||
| 239 | * use the same governor with different tunables for different clusters. | ||
| 240 | */ | ||
| 241 | bool have_governor_per_policy; | ||
| 232 | 242 | ||
| 233 | /* needed by all drivers */ | 243 | /* needed by all drivers */ |
| 234 | int (*init) (struct cpufreq_policy *policy); | 244 | int (*init) (struct cpufreq_policy *policy); |
| @@ -268,8 +278,8 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data); | |||
| 268 | int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); | 278 | int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); |
| 269 | 279 | ||
| 270 | 280 | ||
| 271 | void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state); | 281 | void cpufreq_notify_transition(struct cpufreq_policy *policy, |
| 272 | 282 | struct cpufreq_freqs *freqs, unsigned int state); | |
| 273 | 283 | ||
| 274 | static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, unsigned int min, unsigned int max) | 284 | static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, unsigned int min, unsigned int max) |
| 275 | { | 285 | { |
| @@ -329,6 +339,7 @@ const char *cpufreq_get_current_driver(void); | |||
| 329 | *********************************************************************/ | 339 | *********************************************************************/ |
| 330 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); | 340 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); |
| 331 | int cpufreq_update_policy(unsigned int cpu); | 341 | int cpufreq_update_policy(unsigned int cpu); |
| 342 | bool have_governor_per_policy(void); | ||
| 332 | 343 | ||
| 333 | #ifdef CONFIG_CPU_FREQ | 344 | #ifdef CONFIG_CPU_FREQ |
| 334 | /* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ | 345 | /* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ |
