]> git.baikalelectronics.ru Git - kernel.git/commit
OPP: Add dev_pm_opp_xlate_performance_state() helper
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 2 Nov 2018 09:06:42 +0000 (14:36 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Fri, 14 Dec 2018 10:58:09 +0000 (16:28 +0530)
commit503c1949ca2f3d7a781a9019b6fb3d469bf5876f
tree5cf817834776a2d0b22a9d52d95da02dd71165d8
parent5f33ff30e86d5bc8a2c6269a394fa0982445d673
OPP: Add dev_pm_opp_xlate_performance_state() helper

dev_pm_genpd_set_performance_state() needs to handle performance state
propagation going forward. Currently this routine only gets the required
performance state of the device's genpd as an argument, but it doesn't
know how to translate that to master genpd(s) of the device's genpd.

Introduce a new helper dev_pm_opp_xlate_performance_state() which will
be used to translate from performance state of a device (or genpd
sub-domain) to another device (or master genpd).

Normally the src_table (of genpd sub-domain) will have the
"required_opps" property set to point to one of the OPPs in the
dst_table (of master genpd), but in some cases the genpd and its master
have one to one mapping of performance states and so none of them have
the "required-opps" property set. Return the performance state of the
src_table as it is in such cases.

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/opp/core.c
include/linux/pm_opp.h