remoteproc: qcom_wcnss: Allow replacing regulators with power domains
authorStephan Gerhold <stephan@gerhold.net>
Wed, 16 Sep 2020 10:41:33 +0000 (12:41 +0200)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Mon, 26 Oct 2020 15:23:11 +0000 (10:23 -0500)
commit858bce9c4cddd11088695751e6e30a5230806b06
tree1f4aceb9b89c8252564b6cbccc2c6168420b65cb
parent20a2269c1983aff7894f432b86434ef1738e6d52
remoteproc: qcom_wcnss: Allow replacing regulators with power domains

So far we have been doing all proxy votes by voting for raw voltages/load
through the regulator interface. But actually VDDCX and VDDMX represent
power domains that should be preferably managed using corner votes
through the power domain interface.

Looking closer the code was actually never doing the proxy votes
correctly: The vddcx regulator is specified as:

{ "vddcx", .super_turbo = true },

which is supposed to say that we should vote for the maximum corner
of the VDDCX power domain. But actually "super_turbo" is unused so
all we did so far is to enable the power domain. We did not vote for
it to scale to the maximum performance state.

Using them through the power domain interface allows voting for the
maximum performance state. However, we still need to support using
them through the regulator interface for old device trees.

The way this is implemented here is that we check if attaching the
two power domain succeeds. If yes, we skip the first "num_pd_vregs"
regulators in the "vregs" list and only request the remaining ones.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20200916104135.25085-9-stephan@gerhold.net
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/qcom_wcnss.c