]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: Don't error out fixed regulator in regulator_sync_voltage()
authorDmitry Osipenko <digetx@gmail.com>
Thu, 21 Oct 2021 18:33:08 +0000 (21:33 +0300)
committerMark Brown <broonie@kernel.org>
Sat, 23 Oct 2021 13:21:11 +0000 (14:21 +0100)
commit002bf1e6ce00c6a4acf1aafff8e731b5e7ef8cdb
tree3b1691bd52365d0beceb4fa68cd6876ed94b3e57
parente4e12f5e8cdf9176c4589838d241ac4522d26e58
regulator: Don't error out fixed regulator in regulator_sync_voltage()

Fixed regulator can't change voltage and regulator_sync_voltage()
returns -EINVAL in this case. Make regulator_sync_voltage() to succeed
for regulators that are incapable to change voltage.

On NVIDIA Tegra power management driver needs to sync voltage and we have
one device (Trimslice) that uses fixed regulator which is getting synced.
The syncing error isn't treated as fatal, but produces a noisy error
message. This patch silences that error.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20211021183308.27786-1-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c