From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Lin Ming <minggr@gmail.com>
Cc: Linux PM mailing list <linux-pm@lists.linux-foundation.org>,
Greg KH <gregkh@suse.de>, LKML <linux-kernel@vger.kernel.org>,
Kevin Hilman <khilman@ti.com>,
Grant Likely <grant.likely@secretlab.ca>,
Magnus Damm <magnus.damm@gmail.com>,
linux-sh@vger.kernel.org, MyungJoo Ham <myungjoo.ham@gmail.com>,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Subject: Re: [PATCH 1/5] PM / Runtime: Support for generic I/O power domains (v3)
Date: Tue, 10 May 2011 19:03:02 +0000 [thread overview]
Message-ID: <201105102103.02697.rjw@sisk.pl> (raw)
In-Reply-To: <BANLkTin49iSYn=r8G=L0S2vnZhtZw6RFpw@mail.gmail.com>
On Tuesday, May 10, 2011, Lin Ming wrote:
> On Mon, May 9, 2011 at 5:22 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > From: Rafael J. Wysocki <rjw@sisk.pl>
>
> > +
> > +/**
> > + * __pm_genpd_restore_device - Restore a pre-suspend state of a device.
> > + * @dev: Device to restore the state of.
> > + * @genpd: Power domain the device belongs to.
> > + */
> > +static void __pm_genpd_restore_device(struct device *dev,
> > + struct generic_power_domain *genpd)
> > +{
> > + struct device_driver *drv = dev->driver;
> > +
> > + if (genpd->start_device)
> > + genpd->start_device(dev);
> > +
> > + if (drv && drv->pm && drv->pm->runtime_resume)
> > + drv->pm->runtime_resume(dev);
> > +
> > + if (genpd->stop_device)
> > + genpd->stop_device(dev);
> > +}
>
> Why call ->stop_device in restore function?
Because the device is still suspended at this point, most likely.
Presumably drv->pm->runtime_resume(dev) has restored it's registers, but
the device's runtime PM status hasn't changed (yet).
> BTW,
> you implemented power domains for ARM / shmobile,
> What can we do for other arches?
> I wonder how to implement this "power domain" on x86.
It depends on what kind of x86 you mean. On PCs we can't control power
domains directly and it is done through ACPI power resources, which works.
I don't think there's a need to rework this.
On Moorestown and similar, I can't say, since I don't know how the hardware
is designed.
Thanks,
Rafael
next prev parent reply other threads:[~2011-05-10 19:03 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 ` [linux-pm] [RFC][PATCH 1/2] PM / Runtime: Support for generic I/O power domains Rafael J. Wysocki
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 [this message]
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=201105102103.02697.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=g.liakhovetski@gmx.de \
--cc=grant.likely@secretlab.ca \
--cc=gregkh@suse.de \
--cc=khilman@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=minggr@gmail.com \
--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).