]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: qcom-smd: Batch up requests for disabled regulators
authorBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 22 Jan 2019 19:01:47 +0000 (11:01 -0800)
committerMark Brown <broonie@kernel.org>
Tue, 22 Jan 2019 19:15:37 +0000 (19:15 +0000)
commit314b794243f7d3661a8512ee08e29b4d6e236237
tree8ef72737022214f05db1cb77bea654fa6650fd26
parenta239221e19aee92ce99027c5ba6671eb7346d755
regulator: qcom-smd: Batch up requests for disabled regulators

In some scenarios the early stages of the boot chain has configured
regulators to be in a required state, but the later stages has skipped
to inform the RPM about it's requirements.

But as the SMD RPM regulators are being initialized voltage change
requests will be issued to align the voltage with the valid ranges. The
RPM aggregates all parameters for the specific regulator, the voltage
will be adjusted and the "enabled" state will be "off" - and the
regulator is turned off.

This patch addresses this problem by caching the requested enable state,
voltage and load and send the parameters in a batch, depending on the
enable state - effectively delaying the voltage request for disabled
regulators.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/qcom_smd-regulator.c