linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PM / Domains: Power on the PM domain right after attach completes
@ 2014-11-17 15:19 Ulf Hansson
  2014-11-17 15:32 ` Russell King - ARM Linux
  2014-11-17 18:28 ` Kevin Hilman
  0 siblings, 2 replies; 40+ messages in thread
From: Ulf Hansson @ 2014-11-17 15:19 UTC (permalink / raw)
  To: linux-arm-kernel

The amba bus, amba drivers and a vast amount of platform drivers which
enables runtime PM, don't invoke a pm_runtime_get_sync() while probing
their devices.

Instead, once they have turned on their PM resourses during ->probe()
and are ready to handle I/O, these invokes pm_runtime_set_active() to
synchronize its state towards the runtime PM core.

>From a runtime PM point of view this behavior is perfectly acceptable,
but we encounter probe failures if their corresponding devices resides
in the generic PM domain. The issues are observed for those devices,
which requires its PM domain to stay powered during ->probe() since
that's not being controlled.

While using the generic OF-based PM domain look-up, a device's PM
domain will be attached during the probe sequence. For this path, let's
fix the probe failures, by simply power on the PM domain right after
when it's been attached to the device.

The generic PM domain stays powered until all of its devices becomes
runtime PM enabled and runtime PM suspended.

The old SOCs which makes use of the generic PM domain but don't use the
generic OF-based PM domain look-up, will not be affected from this
change.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/base/power/domain.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 3989eb6..1bfb54c 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -2235,6 +2235,7 @@ int genpd_dev_pm_attach(struct device *dev)
 	}
 
 	dev->pm_domain->detach = genpd_dev_pm_detach;
+	pm_genpd_poweron(pd);
 
 	return 0;
 }
-- 
1.9.1

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

end of thread, other threads:[~2014-11-20 20:56 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-17 15:19 [PATCH] PM / Domains: Power on the PM domain right after attach completes Ulf Hansson
2014-11-17 15:32 ` Russell King - ARM Linux
2014-11-17 16:54   ` Grygorii Strashko
2014-11-17 17:07     ` Russell King - ARM Linux
2014-11-17 18:28 ` Kevin Hilman
2014-11-17 19:06   ` Alan Stern
2014-11-17 19:17     ` Dmitry Torokhov
2014-11-17 19:54       ` Alan Stern
2014-11-17 20:28         ` Dmitry Torokhov
2014-11-17 20:49           ` Alan Stern
2014-11-17 21:11             ` Dmitry Torokhov
2014-11-17 21:44               ` Alan Stern
2014-11-17 22:02                 ` Dmitry Torokhov
2014-11-17 22:12                   ` Alan Stern
2014-11-17 22:17                     ` Dmitry Torokhov
2014-11-17 23:28                       ` Rafael J. Wysocki
2014-11-17 23:26                         ` Dmitry Torokhov
2014-11-18  0:26                           ` Rafael J. Wysocki
2014-11-18  2:16                             ` Rafael J. Wysocki
2014-11-18 14:05                               ` Ulf Hansson
2014-11-18 20:29                                 ` Rafael J. Wysocki
2014-11-19  8:54                                   ` Ulf Hansson
2014-11-20  0:35                                     ` Rafael J. Wysocki
2014-11-20 10:13                                       ` Ulf Hansson
2014-11-20 20:56                                         ` Rafael J. Wysocki
2014-11-20 12:17                                     ` Grygorii Strashko
2014-11-20 13:01                                       ` Ulf Hansson
2014-11-20 15:06                                         ` Grygorii Strashko
2014-11-18 16:13                       ` Alan Stern
2014-11-18 17:18                         ` Dmitry Torokhov
2014-11-18 17:44                           ` Alan Stern
2014-11-18 17:55                             ` Dmitry Torokhov
2014-11-18 20:14                               ` Rafael J. Wysocki
2014-11-18 20:04                                 ` Dmitry Torokhov
2014-11-18 21:03                                   ` Rafael J. Wysocki
2014-11-18 21:17                                     ` Rafael J. Wysocki
2014-11-18 21:02                                       ` Dmitry Torokhov
2014-11-18 21:58                                         ` Rafael J. Wysocki
2014-11-18 21:44                                           ` Dmitry Torokhov
2014-11-18 22:10                                           ` Rafael J. Wysocki

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