aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/cpufreq.h13
-rw-r--r--include/linux/pm_opp.h36
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);
575int cpufreq_boost_trigger_state(int state); 575int cpufreq_boost_trigger_state(int state);
576int cpufreq_boost_supported(void); 576int cpufreq_boost_supported(void);
577int cpufreq_boost_enabled(void); 577int cpufreq_boost_enabled(void);
578int cpufreq_enable_boost_support(void);
579bool policy_has_boost_freq(struct cpufreq_policy *policy);
578#else 580#else
579static inline int cpufreq_boost_trigger_state(int state) 581static 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
594static inline int cpufreq_enable_boost_support(void)
595{
596 return -EINVAL;
597}
598
599static 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 */
593struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu); 605struct 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 */
596extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs; 608extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs;
609extern struct freq_attr cpufreq_freq_attr_scaling_boost_freqs;
597extern struct freq_attr *cpufreq_generic_attr[]; 610extern struct freq_attr *cpufreq_generic_attr[];
598int cpufreq_table_validate_and_show(struct cpufreq_policy *policy, 611int 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
31unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp); 31unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp);
32 32
33bool dev_pm_opp_is_turbo(struct dev_pm_opp *opp);
34
33int dev_pm_opp_get_opp_count(struct device *dev); 35int dev_pm_opp_get_opp_count(struct device *dev);
36unsigned long dev_pm_opp_get_max_clock_latency(struct device *dev);
34 37
35struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev, 38struct 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
68static inline bool dev_pm_opp_is_turbo(struct dev_pm_opp *opp)
69{
70 return false;
71}
72
65static inline int dev_pm_opp_get_opp_count(struct device *dev) 73static inline int dev_pm_opp_get_opp_count(struct device *dev)
66{ 74{
67 return 0; 75 return 0;
68} 76}
69 77
78static inline unsigned long dev_pm_opp_get_max_clock_latency(struct device *dev)
79{
80 return 0;
81}
82
70static inline struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev, 83static 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)
116int of_init_opp_table(struct device *dev); 129int of_init_opp_table(struct device *dev);
117void of_free_opp_table(struct device *dev); 130void of_free_opp_table(struct device *dev);
131int of_cpumask_init_opp_table(cpumask_var_t cpumask);
132void of_cpumask_free_opp_table(cpumask_var_t cpumask);
133int of_get_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask);
134int set_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask);
118#else 135#else
119static inline int of_init_opp_table(struct device *dev) 136static 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)
124static inline void of_free_opp_table(struct device *dev) 141static inline void of_free_opp_table(struct device *dev)
125{ 142{
126} 143}
144
145static inline int of_cpumask_init_opp_table(cpumask_var_t cpumask)
146{
147 return -ENOSYS;
148}
149
150static inline void of_cpumask_free_opp_table(cpumask_var_t cpumask)
151{
152}
153
154static inline int of_get_cpus_sharing_opps(struct device *cpu_dev, cpumask_var_t cpumask)
155{
156 return -ENOSYS;
157}
158
159static 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__ */