aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm_opp.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2018-06-27 16:29:50 +0530
committerViresh Kumar <viresh.kumar@linaro.org>2018-11-05 07:40:43 +0530
commit4c6a343e57fe241fa30ab31ac4969561272cc6b2 (patch)
tree214b1413c1246e5c66d1c2c2df5aa6130d409847 /include/linux/pm_opp.h
parentOPP: Configure all required OPPs (diff)
downloadlinux-dev-4c6a343e57fe241fa30ab31ac4969561272cc6b2.tar.xz
linux-dev-4c6a343e57fe241fa30ab31ac4969561272cc6b2.zip
OPP: Rename and relocate of_genpd_opp_to_performance_state()
The OPP core already has the performance state values for each of the genpd's OPPs and there is no need to call the genpd callback again to get the performance state for the case where the end device doesn't have an OPP table and has the "required-opps" property directly in its node. This commit renames of_genpd_opp_to_performance_state() as of_get_required_opp_performance_state() and moves it to the OPP core, as it is all about OPP stuff now. Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'include/linux/pm_opp.h')
-rw-r--r--include/linux/pm_opp.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
index 8fed222c089b..889bb347fbd9 100644
--- a/include/linux/pm_opp.h
+++ b/include/linux/pm_opp.h
@@ -315,6 +315,7 @@ int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, struct cpumask *cpuma
struct device_node *dev_pm_opp_of_get_opp_desc_node(struct device *dev);
struct dev_pm_opp *of_dev_pm_opp_find_required_opp(struct device *dev, struct device_node *np);
struct device_node *dev_pm_opp_get_of_node(struct dev_pm_opp *opp);
+unsigned int of_get_required_opp_performance_state(struct device_node *np, int index);
#else
static inline int dev_pm_opp_of_add_table(struct device *dev)
{
@@ -357,6 +358,10 @@ static inline struct device_node *dev_pm_opp_get_of_node(struct dev_pm_opp *opp)
{
return NULL;
}
+static inline unsigned int of_get_required_opp_performance_state(struct device_node *np, int index)
+{
+ return 0;
+}
#endif
#endif /* __LINUX_OPP_H__ */