diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/cpufreq.h | 13 | ||||
| -rw-r--r-- | include/linux/pm_opp.h | 36 |
2 files changed, 49 insertions, 0 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 6ff6a4d95eea..430efcbea48e 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
| @@ -575,6 +575,8 @@ ssize_t cpufreq_show_cpus(const struct cpumask *mask, char *buf); | |||
| 575 | int cpufreq_boost_trigger_state(int state); | 575 | int cpufreq_boost_trigger_state(int state); |
| 576 | int cpufreq_boost_supported(void); | 576 | int cpufreq_boost_supported(void); |
| 577 | int cpufreq_boost_enabled(void); | 577 | int cpufreq_boost_enabled(void); |
| 578 | int cpufreq_enable_boost_support(void); | ||
| 579 | bool policy_has_boost_freq(struct cpufreq_policy *policy); | ||
| 578 | #else | 580 | #else |
| 579 | static inline int cpufreq_boost_trigger_state(int state) | 581 | static inline int cpufreq_boost_trigger_state(int state) |
| 580 | { | 582 | { |
| @@ -588,12 +590,23 @@ static inline int cpufreq_boost_enabled(void) | |||
| 588 | { | 590 | { |
| 589 | return 0; | 591 | return 0; |
| 590 | } | 592 | } |
| 593 | |||
| 594 | static inline int cpufreq_enable_boost_support(void) | ||
| 595 | { | ||
| 596 | return -EINVAL; | ||
| 597 | } | ||
| 598 | |||
| 599 | static inline bool policy_has_boost_freq(struct cpufreq_policy *policy) | ||
| 600 | { | ||
| 601 | return false; | ||
| 602 | } | ||
| 591 | #endif | 603 | #endif |
| 592 | /* the following funtion is for cpufreq core use only */ | 604 | /* the following funtion is for cpufreq core use only */ |
| 593 | struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu); | 605 | struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu); |
| 594 | 606 | ||
| 595 | /* the following are really really optional */ | 607 | /* the following are really really optional */ |
| 596 | extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs; | 608 | extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs; |
| 609 | extern struct freq_attr cpufreq_freq_attr_scaling_boost_freqs; | ||
| 597 | extern struct freq_attr *cpufreq_generic_attr[]; | 610 | extern struct freq_attr *cpufreq_generic_attr[]; |
| 598 | int cpufreq_table_validate_and_show(struct cpufreq_policy *policy, | 611 | int cpufreq_table_validate_and_show(struct cpufreq_policy *policy, |
| 599 | struct cpufreq_frequency_table *table); | 612 | struct cpufreq_frequency_table *table); |
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h index cec2d4540914..cab7ba55bedb 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h | |||
| @@ -30,7 +30,10 @@ unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp); | |||
| 30 | 30 | ||
| 31 | unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp); | 31 | unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp); |
| 32 | 32 | ||
| 33 | bool dev_pm_opp_is_turbo(struct dev_pm_opp *opp); | ||
| 34 | |||
| 33 | int dev_pm_opp_get_opp_count(struct device *dev); | 35 | int dev_pm_opp_get_opp_count(struct device *dev); |
| 36 | unsigned long dev_pm_opp_get_max_clock_latency(struct device *dev); | ||
| 34 | 37 | ||
| 35 | struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev, | 38 | struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev, |
| 36 | unsigned long freq, | 39 | unsigned long freq, |
| @@ -62,11 +65,21 @@ static inline unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp) | |||
| 62 | return 0; | 65 | return 0; |
| 63 | } | 66 | } |
| 64 | 67 | ||
| 68 | static inline bool dev_pm_opp_is_turbo(struct dev_pm_opp *opp) | ||
| 69 | { | ||
| 70 | return false; | ||
| 71 | } | ||
| 72 | |||
| 65 | static inline int dev_pm_opp_get_opp_count(struct device *dev) | 73 | static inline int dev_pm_opp_get_opp_count(struct device *dev) |
| 66 | { | 74 | { |
| 67 | return 0; | 75 | return 0; |
| 68 | } | 76 | } |
| 69 | 77 | ||
| 78 | static inline unsigned long dev_pm_opp_get_max_clock_latency(struct device *dev) | ||
| 79 | { | ||
| 80 | return 0; | ||
| 81 | } | ||
| 82 | |||
| 70 | static inline struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev, | 83 | static inline struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev, |
| 71 | unsigned long freq, bool available) | 84 | unsigned long freq, bool available) |
| 72 | { | 85 | { |
| @@ -115,6 +128,10 @@ static inline struct srcu_notifier_head *dev_pm_opp_get_notifier( | |||
| 115 | #if defined(CONFIG_PM_OPP) && defined(CONFIG_OF) | 128 | #if defined(CONFIG_PM_OPP) && defined(CONFIG_OF) |
| 116 | int of_init_opp_table(struct device *dev); | 129 | int of_init_opp_table(struct device *dev); |
| 117 | void of_free_opp_table(struct device *dev); | 130 | void of_free_opp_table(struct device *dev); |
| 131 | int of_cpumask_init_opp_table(cpumask_var_t cpumask); | ||
| 132 | void of_cpumask_free_opp_table(cpumask_var_t cpumask); | ||
| 133 | int of_get_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask); | ||
| 134 | int set_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask); | ||
| 118 | #else | 135 | #else |
| 119 | static inline int of_init_opp_table(struct device *dev) | 136 | static inline int of_init_opp_table(struct device *dev) |
| 120 | { | 137 | { |
| @@ -124,6 +141,25 @@ static inline int of_init_opp_table(struct device *dev) | |||
| 124 | static inline void of_free_opp_table(struct device *dev) | 141 | static inline void of_free_opp_table(struct device *dev) |
| 125 | { | 142 | { |
| 126 | } | 143 | } |
| 144 | |||
| 145 | static inline int of_cpumask_init_opp_table(cpumask_var_t cpumask) | ||
| 146 | { | ||
| 147 | return -ENOSYS; | ||
| 148 | } | ||
| 149 | |||
| 150 | static inline void of_cpumask_free_opp_table(cpumask_var_t cpumask) | ||
| 151 | { | ||
| 152 | } | ||
| 153 | |||
| 154 | static inline int of_get_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask) | ||
| 155 | { | ||
| 156 | return -ENOSYS; | ||
| 157 | } | ||
| 158 | |||
| 159 | static inline int set_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask) | ||
| 160 | { | ||
| 161 | return -ENOSYS; | ||
| 162 | } | ||
| 127 | #endif | 163 | #endif |
| 128 | 164 | ||
| 129 | #endif /* __LINUX_OPP_H__ */ | 165 | #endif /* __LINUX_OPP_H__ */ |
