OPP: Make _generic_set_opp_regulator() a config_regulators() interface
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 31 May 2022 07:19:19 +0000 (12:49 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Fri, 8 Jul 2022 05:57:49 +0000 (11:27 +0530)
commitc522ce8a08066b44539e0dd0998b8e3b277a759b
tree584b6bf68e0c5158e21c929ee0987561890d098d
parentaee3352f6ecf8cfad1f1ee5838cfc4d37c6b8f75
OPP: Make _generic_set_opp_regulator() a config_regulators() interface

In order to reuse the same code path, i.e. clk_set_rate() from
_set_opp(), migrate _generic_set_opp_regulator() to implement a
config_regulators() interface.

It is renamed to _opp_config_regulator_single() and is set as the
preferred config_regulators() interface whenever we have a single
regulator available.

Note that this also drops code responsible for restoring the
voltage/freq in case of errors. We aren't handling that properly
currently, restoring only some of the resources while leaving others out
(like bandwidth and required OPPs). It is better to drop all of it
instead of partial restoration.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/core.c