linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Linux PM list <linux-pm@vger.kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Stephen Boyd <sboyd@kernel.org>,
	Saravana Kannan <saravanak@google.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Kevin Hilman <khilman@kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] PM: domains: Don't attach a device to genpd that corresponds to a provider
Date: Fri, 9 Jul 2021 15:35:20 +0200	[thread overview]
Message-ID: <CAMuHMdWcvAeeif6HwBMrQUs2z+jKcfY1DuKRYeyB+GTkiXGjSw@mail.gmail.com> (raw)
In-Reply-To: <CAPDyKFpzw0mQPFs-jyMX=T6WpZ+vFqrWmoKUWD+9wW8LWqyHuA@mail.gmail.com>

Hi Ulf,

On Fri, Jul 9, 2021 at 3:23 PM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> On Fri, 9 Jul 2021 at 15:07, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Fri, Jul 9, 2021 at 2:56 PM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> > > According to the common power domain DT bindings, a power domain provider
> > > must have a "#power-domain-cells" property in its OF node. Additionally, if
> > > a provider has a "power-domains" property, it means that it has a parent
> > > domain.
> >
> > OK.
> >
> > > It has turned out that some OF nodes that represents a genpd provider may
> > > also be compatible with a regular platform device. This leads to, during
> > > probe, genpd_dev_pm_attach(), genpd_dev_pm_attach_by_name() and
> > > genpd_dev_pm_attach_by_id() tries to attach the corresponding struct device
> > > to the genpd provider's parent domain, which is wrong. Instead the genpd
> >
> > Why is that wrong?
>
> It may lead to that the struct device that corresponds to a genpd
> provider may be attached to the parent domain. In other words, the
> parent domain will not only be controlled by a child domain
> (corresponding to the provider), but also through the provider's
> struct device. As far as I can tell, this has never been the intent
> for how things should work in genpd.

Ah, you're worried about the case where the subdomain is a child of
the parent domain, but the actual subdomain controller (represented
by the platform device) isn't?

> So wrong or not, I guess it depends on what you expect to happen.
>
> Do you see an issue with changing this?

I don't have any hardware where the DTS describes a node as being
both a power domain consumer and a provider.
SH/R-Mobile uses a nested domain description in DT, but there are
no platform devices created for the nested child domains, only for
the top domain.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2021-07-09 13:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-09 12:56 [PATCH] PM: domains: Don't attach a device to genpd that corresponds to a provider Ulf Hansson
2021-07-09 13:06 ` Geert Uytterhoeven
2021-07-09 13:22   ` Ulf Hansson
2021-07-09 13:35     ` Geert Uytterhoeven [this message]
2021-07-09 13:48       ` Ulf Hansson
2021-07-09 13:57         ` Geert Uytterhoeven
2021-07-09 14:02           ` Ulf Hansson
2021-07-09 13:46     ` Bjorn Andersson
2021-07-09 13:58       ` Ulf Hansson
2021-07-09 14:16         ` Bjorn Andersson
2021-07-09 18:49 ` kernel test robot
2021-07-09 19:01 ` kernel test robot

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=CAMuHMdWcvAeeif6HwBMrQUs2z+jKcfY1DuKRYeyB+GTkiXGjSw@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=geert+renesas@glider.be \
    --cc=khilman@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=saravanak@google.com \
    --cc=sboyd@kernel.org \
    --cc=ulf.hansson@linaro.org \
    /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).