All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 02/04] Driver Core: Add idle and wakeup functions
Date: Wed, 10 Jun 2009 08:19:37 +0000	[thread overview]
Message-ID: <200906101019.38159.rjw@sisk.pl> (raw)
In-Reply-To: <20090527100642.29671.52231.sendpatchset@rx1.opensource.se>

On Wednesday 10 June 2009, Magnus Damm wrote:
> On Wed, Jun 10, 2009 at 8:41 AM, Rafael J. Wysocki<rjw@sisk.pl> wrote:
> > On Tuesday 09 June 2009, Magnus Damm wrote:
> >> On Sat, Jun 6, 2009 at 5:42 AM, Rafael J. Wysocki<rjw@sisk.pl> wrote:
> >> > On Friday 05 June 2009, Magnus Damm wrote:
> >> >> On Wed, Jun 3, 2009 at 6:05 PM, Rafael J. Wysocki<rjw@sisk.pl> wrote:
> >> >> > On Friday 29 May 2009, Magnus Damm wrote:
> >> >> >> 2009/5/29 Rafael J. Wysocki <rjw@sisk.pl>:
> >> >> >> > On Wednesday 27 May 2009, Magnus Damm wrote:
> >> >> >> >> From: Magnus Damm <damm@igel.co.jp>
> >> >> >> >>
> >> >> >> >> Add platform_device_idle() and platform_device_wakeup()
> >> >> >> >> and allow architectures to implement their own versions
> >> >> >> >> of these if CONFIG_HAVE_PLATFORM_IDLE_WAKEUP is set.
> >> >> >> >>
> >> >> >> >> Signed-off-by: Magnus Damm <damm@igel.co.jp>
> >> >> >> >> ---
> >>
> >> >> The wakeup()/idle() code in this patch is one way to solve it on a
> >> >> platform device level. Another more generic way would be to add
> >> >> ->enable() and ->disable() callbacks to struct bus_type and introduce
> >> >> device_enable() and device_disable() that takes struct device and
> >> >> invokes the bus callbacks if set.
> >> >
> >> > So, you need a generic mechanism that drivers can use to notify the bus type
> >> > code that a device is idle and therefore it should schedule an autosuspend
> >> > request for the device.  Also, you want a mechanism by which drivers can notify
> >> > the platform code that there is a need to wake-up an autosuspended device.
> >> > Is that correct?
> >>
> >> Yes, you are 100% correct that I want drivers to have some way to
> >> notify the bus type that a certain device is idle or needs to be woken
> >> up.
> >>
> >> Exactly what should happen when the device is marked as idle is a
> >> different question. I guess this is bus specific. Connecting the idle
> >> notification directly to autosuspend is not a very good idea IMO since
> >> the power management comes with latency restrictions.
> >>
> >> If we zoom out a bit then I think that we should have something
> >> similar to cpuidle but for devices. Maybe the driver should give a
> >> list of suspend modes, their latencies and power savings. This per
> >> driver (or per device) latency information is important, but even more
> >> important IMO is latency information for the bus itself.
> >>
> >> So for our on-chip SuperH SoC platform devices I'd like to keep track
> >> of which devices that are idle, and if all devices within one power
> >> domain are idle then i'd like to execute autosuspend() for those and
> >> after that power off the bus/domain. But only if this doesn't break
> >> any latency requirements.
> >
> > OK, I think we can add ->idle() and ->wakeup() callbacks to struct bus_type
> > for this purpose.
> 
> Sounds very good! So unless there are any objections I'll just post a
> "Driver Core: Add idle and wakeup functions V2" which adds ->idle()
> and ->wakeup() callbacks to struct bus_type together with inline asm
> functions device_idle() and device_wakeup().

Well, I'd prefer to do that along with my run-time PM patch that is currently
being discussed with Alan and Oliver (I've sent a Cc of the first message
in that thread to you).

> > BTW, I'm waiting for a new version of your patch adding the arch data to
> > struct platform_device with a better changelog.
> 
> Yeah, sorry about the delay. I will post an updated version!

Great, thanks!

Best,
Rafael

  parent reply	other threads:[~2009-06-10  8:19 UTC|newest]

Thread overview: 89+ 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 10:06 ` [PATCH 01/04] Driver Core: Add platform device arch data Magnus Damm
2009-05-27 10:06 ` Magnus Damm
2009-05-28 21:26   ` Rafael J. Wysocki
2009-05-29  5:07     ` Magnus Damm
2009-05-28 21:26   ` Rafael J. Wysocki
2009-05-29  5:07   ` Magnus Damm
2009-05-29  5:51     ` Paul Mundt
2009-05-29  5:51   ` Paul Mundt
2009-05-27 10:06 ` [PATCH 02/04] Driver Core: Add idle and wakeup functions Magnus Damm
2009-05-28 21:29   ` Rafael J. Wysocki
2009-05-28 21:29   ` Rafael J. Wysocki
2009-05-29  5:10     ` Magnus Damm
2009-05-29  5:10   ` Magnus Damm
2009-06-03  9:05     ` Rafael J. Wysocki
2009-06-03  9:05   ` Rafael J. Wysocki
2009-06-05  3:26     ` Magnus Damm
2009-06-05  3:26   ` Magnus Damm
2009-06-05 20:42     ` Rafael J. Wysocki
2009-06-05 20:42   ` Rafael J. Wysocki
2009-06-09  4:22     ` Magnus Damm
2009-06-09  4:22   ` Magnus Damm
2009-06-09 23:41     ` Rafael J. Wysocki
2009-06-09 23:41   ` Rafael J. Wysocki
2009-06-10  6:03     ` Magnus Damm
2009-06-10  6:03   ` Magnus Damm
2009-06-10  8:19     ` Rafael J. Wysocki
2009-06-10  8:19   ` Rafael J. Wysocki [this message]
2009-05-27 10:06 ` Magnus Damm
2009-05-27 10:06 ` [PATCH 03/04] PM: Add platform bus runtime dev_pm_ops Magnus Damm
2009-05-29 23:23   ` Rafael J. Wysocki
2009-06-02 13:37     ` Magnus Damm
2009-05-29 23:23   ` Rafael J. Wysocki
2009-06-02 13:37   ` Magnus Damm
2009-06-03  9:47     ` Rafael J. Wysocki
2009-06-05 10:40       ` Magnus Damm
2009-06-05 10:40   ` Magnus Damm
2009-06-05 21:24     ` Rafael J. Wysocki
2009-06-05 21:24   ` Rafael J. Wysocki
2009-05-27 10:06 ` Magnus Damm
2009-05-27 10:06 ` [PATCH 04/04] sh: Runtime platform device PM mockup Magnus Damm
2009-05-27 12:10 ` [linux-pm] [PATCH 00/04][RFC] PM: Runtime platform device PM Mark Brown
2009-05-28  6:02   ` Magnus Damm
2009-05-27 12:10 ` Mark Brown
2009-05-27 14:30 ` Alan Stern
2009-05-27 14:30 ` Alan Stern
2009-05-28  6:14   ` Magnus Damm
2009-05-28  0:32 ` Kevin Hilman
2009-05-28  0:32 ` Kevin Hilman
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:33   ` Alan Stern
2009-05-28  7:12 ` Rafael J. Wysocki
2009-05-28 15:28   ` Alan Stern
2009-05-28 15:28 ` Alan Stern
2009-06-01 19:04   ` Rafael J. Wysocki
2009-05-28 15:33 ` Alan Stern
2009-05-29  7:41   ` Magnus Damm
2009-05-28 17:14 ` Kevin Hilman
2009-05-29  9:17   ` Magnus Damm
2009-05-28 17:14 ` Kevin Hilman
2009-05-29  7:41 ` Magnus Damm
2009-05-29 13:45   ` Alan Stern
2009-05-29 13:45     ` Alan Stern
2009-05-29 18:18     ` Rafael J. Wysocki
2009-05-29  9:17 ` Magnus Damm
2009-06-02 21:37   ` Pavel Machek
2009-05-29 18:18 ` Rafael J. Wysocki
2009-06-02 13:44   ` Magnus Damm
2009-06-01 19:04 ` Rafael J. Wysocki
2009-06-01 19:31   ` Alan Stern
2009-06-01 19:31 ` Alan Stern
2009-06-01 19:58   ` Rafael J. Wysocki
2009-06-01 19:58 ` Rafael J. Wysocki
2009-06-01 22:16   ` Alan Stern
2009-06-01 22:16 ` Alan Stern
2009-06-01 23:21   ` Rafael J. Wysocki
2009-06-01 23:21 ` Rafael J. Wysocki
2009-06-02 14:51   ` Alan Stern
2009-06-02 13:44 ` Magnus Damm
2009-06-02 14:51 ` Alan Stern
2009-06-04 16:30   ` Rafael J. Wysocki
2009-06-02 21:37 ` [linux-pm] " Pavel Machek
2009-06-04 10:03   ` Magnus Damm
2009-06-04 10:03 ` [linux-pm] " Magnus Damm
2009-06-04 16:30 ` Rafael J. Wysocki
2009-07-18 11:49   ` Pavel Machek
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=200906101019.38159.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.