Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: Fix resume from suspend to idle

When resuming from idle with the new suspend mode configuration support
we go through the resume callbacks with a state of PM_SUSPEND_TO_IDLE
which we don't have regulator constraints for, causing an error:

dpm_run_callback(): regulator_resume_early+0x0/0x64 returns -22
PM: Device regulator.0 failed to resume early: error -22

Avoid this and similar errors by treating missing constraints as a noop.

See also commit 57a0dd187956ea04 ("regulator: Fix suspend to idle"),
which fixed the suspend part.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Geert Uytterhoeven and committed by
Mark Brown
35b5f14e 7928b2cb

+1 -1
+1 -1
drivers/regulator/core.c
··· 4310 4310 4311 4311 rstate = regulator_get_suspend_state(rdev, *state); 4312 4312 if (rstate == NULL) 4313 - return -EINVAL; 4313 + return 0; 4314 4314 4315 4315 mutex_lock(&rdev->mutex); 4316 4316