diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2018-11-02 11:18:08 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2018-12-14 16:28:14 +0530 |
commit | 1067ae3e427fba60965fc519e20d54d0b210fd27 (patch) | |
tree | 1f55911d73f9ee3f8372d7ce9dcf166f65ee3d8d /include/linux/pm_domain.h | |
parent | 2feb5a896c42fb24f6d6f7028574dc59bfc9306f (diff) | |
download | linux-next-1067ae3e427fba60965fc519e20d54d0b210fd27.tar.gz |
PM / Domains: Save OPP table pointer in genpd
dev_pm_genpd_set_performance_state() will be required to call
dev_pm_opp_xlate_performance_state() going forward to translate from
performance state of a sub-domain to performance state of its master.
And dev_pm_opp_xlate_performance_state() needs pointers to the OPP
tables of both genpd and its master.
Lets fetch and save them while the OPP tables are added. Fetching the
OPP tables should never fail as we just added the OPP tables and so add
a WARN_ON() for such a bug instead of full error paths.
Tested-by: Rajendra Nayak <rnayak@codeaurora.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'include/linux/pm_domain.h')
-rw-r--r-- | include/linux/pm_domain.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index 642036952553..9ad101362aef 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -73,6 +73,7 @@ struct genpd_power_state { struct genpd_lock_ops; struct dev_pm_opp; +struct opp_table; struct generic_pm_domain { struct device dev; @@ -94,6 +95,7 @@ struct generic_pm_domain { unsigned int performance_state; /* Aggregated max performance state */ int (*power_off)(struct generic_pm_domain *domain); int (*power_on)(struct generic_pm_domain *domain); + struct opp_table *opp_table; /* OPP table of the genpd */ unsigned int (*opp_to_performance_state)(struct generic_pm_domain *genpd, struct dev_pm_opp *opp); int (*set_performance_state)(struct generic_pm_domain *genpd, |