linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peng Fan <peng.fan@nxp.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Kevin Hilman <khilman@kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Lina Iyer <ilina@codeaurora.org>,
	Lukasz Luba <lukasz.luba@arm.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Stephen Boyd <sboyd@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2 3/3] PM / Domains: Add support for PM domain on/off notifiers for genpd
Date: Fri, 25 Sep 2020 14:30:26 +0000	[thread overview]
Message-ID: <DB6PR0402MB2760B91DB92A5307E12D59BB88360@DB6PR0402MB2760.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <CAPDyKFrrLq6mPCsSoRBBmgMxSvC4xeiSedi1c5CsEWF=+f73mw@mail.gmail.com>

> Subject: Re: [PATCH v2 3/3] PM / Domains: Add support for PM domain on/off
> notifiers for genpd
> 
> On Fri, 25 Sep 2020 at 08:08, Peng Fan <peng.fan@nxp.com> wrote:
> >
> > Hi Ulf,
> >
> > > Subject: [PATCH v2 3/3] PM / Domains: Add support for PM domain
> > > on/off notifiers for genpd
> > >
> > > A device may have specific HW constraints that must be obeyed to,
> > > before its corresponding PM domain (genpd) can be powered off - and
> > > vice verse at power on. These constraints can't be managed through
> > > the regular runtime PM based deployment for a device, because the
> > > access pattern for it, isn't always request based. In other words,
> > > using the runtime PM callbacks to deal with the constraints doesn't work
> for these cases.
> >
> > Could the notification be added before/after power on, and
> > before/after power off? not just after power on and before power off?
> >
> > Our SoC has a requirement that before power on/off the specific
> > module, the corresponding clk needs to be on to make sure the hardware
> > async bridge could finish handshake.
> 
> Thanks for your comments!
> 
> May I ask, to be sure - does the clock correspond to the genpd provider or is it
> a clock for the genpd consumer device?

It is the clock for the genpd consumer device.

> 
> If the former, couldn't the clock be managed from the ->power_on|off()
> callbacks for the genpd provider?

Sadly not former.

Our current solution is to add a clock property to the power domain node(NXP ARM SIP
based power domain driver), and when power_on/off, we enable/disable the clocks.

But we are moving to use SCMI power domain, and leave the clock in Linux,
Scmi power domain driver is a generic driver, and we are not able to mix clock
parts in the driver which is bad.

Your patch gives me a light that if we could use notification to let consumer
device driver do the clock enable/disable for each power on and power off.
That would be great.


Thanks,
Peng.
> 
> >
> > So we need clk_prepare_on/off to guard power on and power off as below:
> >
> > clk_prepare_on
> > power on
> > clk_prepare_off
> >
> > clk_prepare_on
> > power off
> > clk_prepare_off
> >
> > Thanks,
> > Peng.
> >
> 
> [...]
> 
> Kind regards
> Uffe

  reply	other threads:[~2020-09-25 14:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24 11:04 [PATCH v2 0/3] PM / Domains: Add power on/off notifiers for genpd Ulf Hansson
2020-09-24 11:04 ` [PATCH v2 1/3] PM / Domains: Rename power state enums " Ulf Hansson
2020-09-24 11:04 ` [PATCH v2 2/3] PM / Domains: Allow to abort power off when no ->power_off() callback Ulf Hansson
2020-09-24 11:04 ` [PATCH v2 3/3] PM / Domains: Add support for PM domain on/off notifiers for genpd Ulf Hansson
2020-09-25  6:08   ` Peng Fan
2020-09-25 11:48     ` Ulf Hansson
2020-09-25 14:30       ` Peng Fan [this message]
2020-09-28  9:03         ` Ulf Hansson
2020-09-28 11:56 ` [PATCH v2 0/3] PM / Domains: Add power " Ulf Hansson
2020-10-02 17:17   ` Rafael J. Wysocki

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=DB6PR0402MB2760B91DB92A5307E12D59BB88360@DB6PR0402MB2760.eurprd04.prod.outlook.com \
    --to=peng.fan@nxp.com \
    --cc=Lorenzo.Pieralisi@arm.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=ilina@codeaurora.org \
    --cc=khilman@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rjw@rjwysocki.net \
    --cc=sboyd@kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=ulf.hansson@linaro.org \
    --cc=vincent.guittot@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).