LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Eric Anholt <eric@anholt.net>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Tomasz Figa <tomasz.figa@gmail.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	Kevin Hilman <khilman@linaro.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH] PM / Domains: If an OF node is found but no device probed yet, defer.
Date: Thu, 12 Mar 2015 09:39:45 +0100	[thread overview]
Message-ID: <CAPDyKFrFOTUVZ6qd5D+-otwAQxXJ78G47p76Pnjmvv_TvkG0=w@mail.gmail.com> (raw)
In-Reply-To: <1426087648-3862-1-git-send-email-eric@anholt.net>

On 11 March 2015 at 16:27, Eric Anholt <eric@anholt.net> 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 <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
>
> --
> 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/

      parent reply	other threads:[~2015-03-12  8:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPDyKFrFOTUVZ6qd5D+-otwAQxXJ78G47p76Pnjmvv_TvkG0=w@mail.gmail.com' \
    --to=ulf.hansson@linaro.org \
    --cc=eric@anholt.net \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=khilman@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=tomasz.figa@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).