All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: Fix resume from suspend to idle
@ 2018-02-13  9:37 Geert Uytterhoeven
  2018-02-14 14:00 ` Sudeep Holla
  2018-02-20 12:39 ` Applied "regulator: Fix resume from suspend to idle" to the regulator tree Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2018-02-13  9:37 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: linux-renesas-soc, linux-kernel, Geert Uytterhoeven

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>
---
[hiding in brown paper bag]
No idea how I managed not to see this when testing 57a0dd187956ea04.

 drivers/regulator/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index dd4708c58480d277..1fc0c0811da4e9f2 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -4310,7 +4310,7 @@ static int _regulator_resume_early(struct device *dev, void *data)
 
 	rstate = regulator_get_suspend_state(rdev, *state);
 	if (rstate == NULL)
-		return -EINVAL;
+		return 0;
 
 	mutex_lock(&rdev->mutex);
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-20 12:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-13  9:37 [PATCH] regulator: Fix resume from suspend to idle Geert Uytterhoeven
2018-02-14 14:00 ` Sudeep Holla
2018-02-20 12:39 ` Applied "regulator: Fix resume from suspend to idle" to the regulator tree Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.