linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: MyungJoo Ham <myungjoo.ham@gmail.com>
Cc: Linux PM mailing list <linux-pm@lists.linux-foundation.org>,
	linux-sh@vger.kernel.org, Greg KH <gregkh@suse.de>,
	LKML <linux-kernel@vger.kernel.org>,
	Grant Likely <grant.likely@secretlab.ca>
Subject: Re: [linux-pm] [RFC][PATCH 1/2] PM / Runtime: Support for generic I/O power domains
Date: Wed, 04 May 2011 17:08:25 +0000	[thread overview]
Message-ID: <201105041908.26070.rjw@sisk.pl> (raw)
In-Reply-To: <BANLkTimbUQ9-U9yPkCspf=dL0JfyXqbSng@mail.gmail.com>

On Wednesday, May 04, 2011, MyungJoo Ham wrote:
> On Sat, Apr 30, 2011 at 5:11 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> >
> > Well, not really.  There are a few things to consider.
> >
> > First, in general, there may be devices that have a real parent and belong
> > to a power domain at the same time, so we can't "steal" the parent
> > pointers from them.
> 
> Ah. right we only have one parent per device. Ok, setting a power
> domain as a device's parent is not going to work for some devices.
> 
> 
> However, I have some other questions.
> 
> 1. pm_genpd_runtime_suspend and pm_genpd_runtime_resume are opened to
> outside (not static and "extern"ed). Are devices supposed to call
> pm_genpd_runtime_* directly?

I suppose you mean drivers.  No, they aren't.

> Shouldn't they be hidden so that devices
> are forced to turn on/off power domains with runtime_pm framework
> only? Is there any reason to expose them?

I thought some subsystems might bypass pm_genpd_init() and use their own
initialization, in which case the extern definitions would be useful.

That said, they aren't necessary at the moment, so I'll make them static
in the final version of the patch.

> 2.  If we can assure that related clocks are not turned on when a
> power domain is shutting down, it'd be nice.

If you look at the shmobile patch at
https://patchwork.kernel.org/patch/742932/
you'll see that it uses the ->stop_device() and ->start_device()
callbacks for this purpose.

> I guess it would be sufficient to let it "WARN" at
> gov->power_down_ok().

Sure, you can do that too.

> Is it the intention of governor?

No, the intention of the governor is to make it possible to take
for example, latencies, into account when deciding whether or not to
power down the domain.  In short, my idea is that the governor will
have information on how much time it's going to take to power down
and resume the power domain (along with all devices) and, on the other hand,
what maximum wakeup latency is acceptable for the given power domain.
It will compare the two numbers and return "true" if the second one is
greater, for example.  That said, I don't have a clean use case at the moment,
so that's more of a future stub than something necessary right now.

> Thank you! I also think this is going to help us a lot, too :)

Good to hear that. :-)

Thanks,
Rafael

  reply	other threads:[~2011-05-04 17:08 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-28 23:54 [RFC][PATCH 0/2] PM: Support for generic I/O power domains Rafael J. Wysocki
2011-04-28 23:54 ` [RFC][PATCH 1/2] PM / Runtime: " Rafael J. Wysocki
2011-04-29  1:26   ` [linux-pm] [RFC][PATCH 1/2] PM / Runtime: Support for generic I/O MyungJoo Ham
2011-04-29 20:11     ` [linux-pm] [RFC][PATCH 1/2] PM / Runtime: Support for generic I/O power domains Rafael J. Wysocki
2011-05-04  8:43       ` [linux-pm] [RFC][PATCH 1/2] PM / Runtime: Support for generic I/O MyungJoo Ham
2011-05-04 17:08         ` Rafael J. Wysocki [this message]
2011-04-29 20:54   ` [RFC][PATCH 1/2] PM / Runtime: Support for generic I/O power Greg KH
2011-04-30  0:54   ` [Update][RFC][PATCH 1/2] PM / Runtime: Support for generic I/O power domains (v2) Rafael J. Wysocki
2011-04-30  1:08     ` [Update][RFC][PATCH 1/2] PM / Runtime: Support for generic I/O Greg KH
2011-05-11  7:26     ` Kevin Hilman
2011-05-11 20:37       ` [Update][RFC][PATCH 1/2] PM / Runtime: Support for generic I/O power domains (v2) Rafael J. Wysocki
2011-04-28 23:55 ` [RFC][PATCH 2/2] ARM / shmobile: Support for I/O power domains for SH7372 Rafael J. Wysocki
2011-04-30  0:59   ` [Update][RFC][PATCH 2/2] ARM / shmobile: Support for I/O power domains for SH7372 (v2) Rafael J. Wysocki
2011-04-30  9:56     ` [RFC][PATCH] ARM / shmobile: Support for power domain A4MP on SH7372 Rafael J. Wysocki
2011-05-08 21:20 ` [RFC][PATCH 0/5] PM: Support for generic I/O power domains (v2) Rafael J. Wysocki
2011-05-08 21:22   ` [PATCH 1/5] PM / Runtime: Support for generic I/O power domains (v3) Rafael J. Wysocki
     [not found]     ` <BANLkTinPGQNUrFnyFVazqA72iyMbB-K_OA@mail.gmail.com>
2011-05-09 19:22       ` [linux-pm] " Rafael J. Wysocki
2011-05-10  8:22     ` Lin Ming
2011-05-10 19:03       ` Rafael J. Wysocki
2011-05-08 21:23   ` [PATCH 2/5] PM: Introduce generic prepare and complete callbacks for subsystems Rafael J. Wysocki
2011-05-08 21:24   ` [PATCH 3/5] PM: Support for system-wide power transitions in generic power domains Rafael J. Wysocki
2011-05-09 14:36     ` [linux-pm] [PATCH 3/5] PM: Support for system-wide power Alan Stern
2011-05-09 19:20       ` [linux-pm] [PATCH 3/5] PM: Support for system-wide power transitions in generic power domains Rafael J. Wysocki
2011-05-09 22:10     ` [Update][PATCH 3/5] PM: System-wide power transitions support for " Rafael J. Wysocki
2011-05-10 21:19       ` [Update 2x][PATCH " Rafael J. Wysocki
2011-05-11 17:17     ` [PATCH 3/5] PM: Support for system-wide power transitions in Jonathan Corbet
2011-05-11 19:11       ` [PATCH 3/5] PM: Support for system-wide power transitions in generic power domains Rafael J. Wysocki
2011-05-08 21:25   ` [PATCH 4/5] ARM / shmobile: Support for I/O power domains for SH7372 (v4) Rafael J. Wysocki
2011-05-08 21:25   ` [PATCH 5/5] ARM / shmobile: Support for power domain A4MP on SH7372 Rafael J. Wysocki
2011-05-15 23:17   ` [PATCH 0/6] PM: Support for generic I/O power domains (v3) Rafael J. Wysocki
2011-05-15 23:30     ` [PATCH 1/6] PM: Introduce generic prepare and complete callbacks for subsystems Rafael J. Wysocki
2011-05-15 23:31     ` [PATCH 2/6] PM / Runtime: Support for generic I/O power domains (v4) Rafael J. Wysocki
2011-05-15 23:31     ` [PATCH 3/6] PM: System-wide transitions support for generic power domains (v2) Rafael J. Wysocki
2011-05-15 23:32     ` [PATCH 4/6] ARM / shmobile: Support for I/O power domains for SH7372 (v5) Rafael J. Wysocki
2011-05-15 23:33     ` [PATCH 5/6] ARM / shmobile: Support for power domain A4MP on SH7372 Rafael J. Wysocki
2011-05-15 23:34     ` [PATCH 6/6][RFC] PM / Domains: Support for multiple generic power domain states R. J. Wysocki
2011-05-15 23:38     ` Rafael J. Wysocki
2011-05-16 10:07       ` Kevin Hilman
2011-05-16 18:29         ` Rafael J. Wysocki
2011-05-27 23:15     ` [PATCH 0/5] PM: Support for generic I/O power domains (v4) Rafael J. Wysocki
2011-05-27 23:17       ` [PATCH 1/5] PM / Runtime: " Rafael J. Wysocki
2011-06-02  7:29         ` [PATCH 1/5] PM / Runtime: Support for generic I/O power domains Guennadi Liakhovetski
2011-06-06 18:48           ` [PATCH 1/5] PM / Runtime: Support for generic I/O power domains (v4) Rafael J. Wysocki
2011-05-27 23:17       ` [PATCH 2/5] PM: System-wide transitions support for generic power domains (v2) Rafael J. Wysocki
2011-05-27 23:18       ` [PATCH 3/5] ARM / shmobile: Support for I/O power domains for SH7372 (v5) Rafael J. Wysocki
2011-05-27 23:18       ` [PATCH 4/5] PM / Domains: Support for multiple generic power domain states Rafael J. Wysocki
2011-05-27 23:19       ` [PATCH 5/5] ARM / shmobile: Support for power domain A4MP on SH7372 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=201105041908.26070.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=grant.likely@secretlab.ca \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=myungjoo.ham@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).