]> git.baikalelectronics.ru Git - kernel.git/commit
PM / Domains: Save OPP table pointer in genpd
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 2 Nov 2018 05:48:08 +0000 (11:18 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Fri, 14 Dec 2018 10:58:14 +0000 (16:28 +0530)
commitf34d0723d7e104c718762d918a8ac4b8a40127ac
tree1f55911d73f9ee3f8372d7ce9dcf166f65ee3d8d
parent2ac5a20036cb5085602c3b1cd5c43425559c015b
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>
drivers/base/power/domain.c
include/linux/pm_domain.h