From: Kevin Hilman <khilman@deeprootsystems.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 00/04][RFC] PM: Runtime platform device PM
Date: Thu, 28 May 2009 00:32:17 +0000 [thread overview]
Message-ID: <87prdut6cu.fsf@deeprootsystems.com> (raw)
In-Reply-To: <20090527100625.29671.43166.sendpatchset@rx1.opensource.se>
Magnus Damm <magnus.damm@gmail.com> writes:
> PM: Runtime platform device power management
>
> [PATCH 01/04] Driver Core: Add platform device arch data
> [PATCH 02/04] Driver Core: Add idle and wakeup functions
> [PATCH 03/04] PM: Add platform bus runtime dev_pm_ops
> [PATCH 04/04] sh: Runtime platform device PM mockup
>
> These patches extend platform device and driver interfaces to
> allow architectures to implement platform device runtime pm.
>
> Upstream runtime power management needs to be improved to fully
> make use of hardware power saving features found on embedded
> platforms and in common SoCs.
>
> For runtime power management we today have cpuidle, the clock
> framework and qos. This allows the cpu core to enter various
> forms of deep sleep, and for devices we may stop clocks to save
> power. Modern SoCs however allow disabling of power to parts of
> the chip, and we have no upstream interface to handle that today.
>
> I propose adding the following simple platform device functions:
> - platform_device_wakeup()
> - platform_device_idle()
>
> The idle function is used by the platform driver to let the
> architecture power management code know that from now on the
> device is in idle state. When the device is marked as idle
> the architecture specific runtime power management may decide
> to do various levels of device power management, ranging from
> stopping clocks to turning off power. The dev_pm_ops callbacks
> may be invoked by the runtime pm code to save and restore state
> whenever the device is marked as idle.
>
> The wakeup function is used by the platform driver to notify the
> architecture code that the driver wants to make use of the hardware
> device. If the device has been put in sleep then it needs to be
> woken up. This wakeup call may invoke dev_pm_ops callbacks.
>
> Have a look at the last patch for a SuperH mockup that shows how
> it all fits together. We need this or a similar interface to be able
> to enter deep sleep states on SuperH. I believe other architectures
> have similar requirements.
>
> Signed-off-by: Magnus Damm <damm@igel.co.jp>
Speaking on behalf of OMAP PM developers, and as maintainer of the
current OMAP PM infrastructure, this is a major step towards a generic
runtime PM that we would use on OMAP as well.
In the PM branch of the linux-omap tree, we currently have an ad-hoc
but working infrastructure for all of this, including device-specific
save/restore hooks for supporting some or all of the on-chip
powerdomains to go off during idle.
However, our current approach hides most of the details behind the
clock framework, custom save/restore hooks and in some cases custom
platform hooks passed using platform_data.
I like this proposed approach much better as it generalizes the
approach and allows us to share the infrastructure across arches
as well as decouple device idleness from clock management.
Kevin
next prev parent reply other threads:[~2009-05-28 0:32 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-27 10:06 [PATCH 00/04][RFC] PM: Runtime platform device PM Magnus Damm
2009-05-27 12:10 ` [linux-pm] " Mark Brown
2009-05-27 14:30 ` Alan Stern
2009-05-28 0:32 ` Kevin Hilman [this message]
2009-05-28 6:02 ` [linux-pm] " Magnus Damm
2009-05-28 6:14 ` Magnus Damm
2009-05-28 7:12 ` Rafael J. Wysocki
2009-05-28 15:28 ` Alan Stern
2009-05-28 15:33 ` Alan Stern
2009-05-28 17:14 ` Kevin Hilman
2009-05-29 7:41 ` Magnus Damm
2009-05-29 13:45 ` Alan Stern
2009-05-29 9:17 ` Magnus Damm
2009-05-29 18:18 ` Rafael J. Wysocki
2009-06-01 19:04 ` Rafael J. Wysocki
2009-06-01 19:31 ` Alan Stern
2009-06-01 19:58 ` Rafael J. Wysocki
2009-06-01 22:16 ` Alan Stern
2009-06-01 23:21 ` Rafael J. Wysocki
2009-06-02 13:44 ` Magnus Damm
2009-06-02 14:51 ` Alan Stern
2009-06-02 21:37 ` [linux-pm] " Pavel Machek
2009-06-04 10:03 ` Magnus Damm
2009-06-04 16:30 ` Rafael J. Wysocki
2009-07-18 11:49 ` [linux-pm] " Pavel Machek
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=87prdut6cu.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=linux-sh@vger.kernel.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