summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2018-06-13 20:22:04 +0530
committerViresh Kumar <viresh.kumar@linaro.org>2018-11-05 07:40:43 +0530
commite38f89d310fcc543b0b94594a92db1d6cfbd9376 (patch)
tree1768f78fc7800d969e9740785674d093c018ccaf /include
parentda544b61eb5541db8827af0beab618daead88a34 (diff)
PM / Domains: Add genpd_opp_to_performance_state()
The OPP core currently stores the performance state in the consumer device's OPP table, but that is going to change going forward and performance state will rather be set directly in the genpd's OPP table. For that we need to get the performance state for genpd's device structure (genpd->dev) instead of the consumer device's structure. Add a new helper to do that. Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/pm_domain.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index 3b5d7280e52e..4f803f934308 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -258,6 +258,8 @@ int of_genpd_add_subdomain(struct of_phandle_args *parent,
struct generic_pm_domain *of_genpd_remove_last(struct device_node *np);
int of_genpd_parse_idle_states(struct device_node *dn,
struct genpd_power_state **states, int *n);
+unsigned int pm_genpd_opp_to_performance_state(struct device *genpd_dev,
+ struct dev_pm_opp *opp);
unsigned int of_genpd_opp_to_performance_state(struct device *dev,
struct device_node *np);
@@ -300,6 +302,13 @@ static inline int of_genpd_parse_idle_states(struct device_node *dn,
}
static inline unsigned int
+pm_genpd_opp_to_performance_state(struct device *genpd_dev,
+ struct dev_pm_opp *opp)
+{
+ return 0;
+}
+
+static inline unsigned int
of_genpd_opp_to_performance_state(struct device *dev,
struct device_node *np)
{