LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] PM / Domains: If an OF node is found but no device probed yet, defer.
@ 2015-03-11 15:27 Eric Anholt
  2015-03-11 22:08 ` Rafael J. Wysocki
  2015-03-12  8:39 ` Ulf Hansson
  0 siblings, 2 replies; 9+ messages in thread
From: Eric Anholt @ 2015-03-11 15:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Tomasz Figa, Rafael J. Wysocki, Greg Kroah-Hartman, Eric Anholt

If we've declared a power domain in the OF, and the OF node is found
but the requested domain hasn't been registered on it yet, then we
probably have just tried to probe before the power domain driver has.
Defer our device's probe until it shows up.

Signed-off-by: Eric Anholt <eric@anholt.net>
---

I ran into this when turning my ad-hoc code for BCM2835 (Raspberry Pi)
USB poweron support in the DWC2 controller to an OF-based power domain
declaration.

drivers/base/power/domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index ba4abbe..2b93c98 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -2064,7 +2064,7 @@ EXPORT_SYMBOL_GPL(of_genpd_del_provider);
 struct generic_pm_domain *of_genpd_get_from_provider(
 					struct of_phandle_args *genpdspec)
 {
-	struct generic_pm_domain *genpd = ERR_PTR(-ENOENT);
+	struct generic_pm_domain *genpd = ERR_PTR(-EPROBE_DEFER);
 	struct of_genpd_provider *provider;
 
 	mutex_lock(&of_genpd_mutex);
-- 
2.1.4


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

end of thread, other threads:[~2015-03-18 22:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-11 15:27 [PATCH] PM / Domains: If an OF node is found but no device probed yet, defer Eric Anholt
2015-03-11 22:08 ` Rafael J. Wysocki
2015-03-11 22:14   ` Geert Uytterhoeven
2015-03-12 19:31     ` Eric Anholt
2015-03-13 18:01     ` Kevin Hilman
2015-03-16  8:44       ` Geert Uytterhoeven
2015-03-16 10:12       ` Ulf Hansson
2015-03-18 22:55         ` Eric Anholt
2015-03-12  8:39 ` Ulf Hansson

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