linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] platform: detach from PM domains on shutdown
@ 2018-05-15  9:01 Peng Fan
  2018-05-16  9:52 ` Ulf Hansson
  0 siblings, 1 reply; 12+ messages in thread
From: Peng Fan @ 2018-05-15  9:01 UTC (permalink / raw)
  To: rafael.j.wysocki
  Cc: ulf.hansson, fabio.estevam, gregkh, linux-kernel, linux-pm,
	linux-imx, Peng Fan

When reboot Linux, the PM domains attached to a device
are not shutdown. To SoCs which relys on reset the whole SoC,
there is no need to shutdown PM domains, but to Linux running
in a virtual machine with devices pass-through, we could not
reset the whole SoC. Currently we need Linux to shutdown its
PM domains when reboot.

commit 2d30bb0b3889 ("platform: Do not detach from PM domains on shutdown"),
removes what this patch tries to add, because of a warning.
commit e79aee49bcf9 ("PM: Avoid false-positive warnings in dev_pm_domain_set()")
already fixes the false alarm warning. So let's detach the power domain
to shutdown PM domains after driver shutdown.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---

I do not find a better place to shutdown power domain when reboot Linux,
so add back the line that commit 2d30bb0b3889 removes, because it is
a false alarm warning as commit e79aee49bcf9 describes.

 drivers/base/platform.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 8075ddc70a17..a5929f24dc3c 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -616,6 +616,7 @@ static void platform_drv_shutdown(struct device *_dev)
 
 	if (drv->shutdown)
 		drv->shutdown(dev);
+	dev_pm_domain_detach(_dev, true);
 }
 
 /**
-- 
2.14.1

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

end of thread, other threads:[~2018-05-29  7:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-15  9:01 [RFC] platform: detach from PM domains on shutdown Peng Fan
2018-05-16  9:52 ` Ulf Hansson
2018-05-16 12:53   ` Peng Fan
2018-05-16 21:34   ` Rafael J. Wysocki
2018-05-17  2:33     ` Peng Fan
2018-05-17  8:01       ` Rafael J. Wysocki
2018-05-17 12:37         ` Peng Fan
2018-05-18  7:54           ` Rafael J. Wysocki
2018-05-18  8:53             ` Peng Fan
2018-05-28  8:01               ` Peng Fan
2018-05-28  8:31                 ` Rafael J. Wysocki
2018-05-29  7:52                   ` Peng Fan

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).