linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: core: Handle PM_SUSPEND_TO_IDLE suspend_state_t
@ 2018-02-18 17:04 Hans de Goede
  2018-02-19 11:34 ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Hans de Goede @ 2018-02-18 17:04 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood; +Cc: Hans de Goede, linux-kernel

The regulator framework is used on x86 in some cases now and x86 has
a PM_SUSPEND_TO_IDLE suspend_state_t, treat this as PM_SUSPEND_STANDBY,
this fixes these errors on resume:

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

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/regulator/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index dd4708c58480..c980703ba705 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -333,6 +333,7 @@ regulator_get_suspend_state(struct regulator_dev *rdev, suspend_state_t state)
 		return NULL;
 
 	switch (state) {
+	case PM_SUSPEND_TO_IDLE:
 	case PM_SUSPEND_STANDBY:
 		return &rdev->constraints->state_standby;
 	case PM_SUSPEND_MEM:
-- 
2.14.3

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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-18 17:04 [PATCH] regulator: core: Handle PM_SUSPEND_TO_IDLE suspend_state_t Hans de Goede
2018-02-19 11:34 ` Mark Brown
2018-02-19 20:59   ` Hans de Goede
2018-02-20 11:47     ` Mark Brown
2018-02-20 12:12       ` Hans de Goede
2018-02-20 12:41         ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).