OPP: Configure all required OPPs
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 14 Jun 2018 04:33:26 +0000 (10:03 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Mon, 5 Nov 2018 02:10:43 +0000 (07:40 +0530)
commitca1b5d77b1c69df7d7b92860c61daa82c8bfde34
treecf9e7c140a601d1ea0b79a5ee89b56ca84914f40
parent4f018bc0e1cfdec2e25072db9fecc1f363ba79ea
OPP: Configure all required OPPs

Now that all the infrastructure is in place to support multiple required
OPPs, lets switch over to using it.

A new internal routine _set_required_opps() takes care of updating
performance state for all the required OPPs. With this the performance
state updates are supported even when the end device needs to configure
regulators as well, that wasn't the case earlier.

The pstates were earlier stored in the end device's OPP structures, that
also changes now as those values are stored in the genpd's OPP
structures. And so we switch over to using
pm_genpd_opp_to_performance_state() instead of
of_genpd_opp_to_performance_state() to get performance state for the
genpd OPPs.

The routine _generic_set_opp_domain() is not required anymore and is
removed.

On errors we don't try to recover by reverting to old settings as things
are really complex now and the calls here should never really fail
unless there is a bug. There is no point increasing the complexity, for
code which will never be executed.

Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/core.c
drivers/opp/of.c