From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752444AbbCLIjt (ORCPT ); Thu, 12 Mar 2015 04:39:49 -0400 Received: from mail-qc0-f172.google.com ([209.85.216.172]:40390 "EHLO mail-qc0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751039AbbCLIjp (ORCPT ); Thu, 12 Mar 2015 04:39:45 -0400 MIME-Version: 1.0 In-Reply-To: <1426087648-3862-1-git-send-email-eric@anholt.net> References: <1426087648-3862-1-git-send-email-eric@anholt.net> Date: Thu, 12 Mar 2015 09:39:45 +0100 Message-ID: Subject: Re: [PATCH] PM / Domains: If an OF node is found but no device probed yet, defer. From: Ulf Hansson To: Eric Anholt Cc: "linux-kernel@vger.kernel.org" , Tomasz Figa , "Rafael J. Wysocki" , Greg Kroah-Hartman , "linux-pm@vger.kernel.org" , Kevin Hilman , Geert Uytterhoeven Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11 March 2015 at 16:27, Eric Anholt wrote: > 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. As Geert also pointed out in his reply; I think the proper solution is to move the registration of the PM domain to an earlier init level. The main reason from my side is that I don't want us to invent yet another "probe scenario", since we currently already have some difficulties to handle the existing ones. Like the issue below. http://marc4.marc.info/?t=142392781500004&r=1&w=2 Kind regards Uffe > > Signed-off-by: Eric Anholt > --- > > 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 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/