mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 16:41:58 +00:00
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>
This commit is contained in:
parent
3253e24bc2
commit
400d5a5da4
@ -4249,6 +4249,9 @@ int regulator_sync_voltage(struct regulator *regulator)
|
||||
struct regulator_voltage *voltage = ®ulator->voltage[PM_SUSPEND_ON];
|
||||
int ret, min_uV, max_uV;
|
||||
|
||||
if (!regulator_ops_is_valid(rdev, REGULATOR_CHANGE_VOLTAGE))
|
||||
return 0;
|
||||
|
||||
regulator_lock(rdev);
|
||||
|
||||
if (!rdev->desc->ops->set_voltage &&
|
||||
|
Loading…
Reference in New Issue
Block a user