linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Eric Miao <eric.miao@canonical.com>,
	Nicolas Pitre <nico@fluxnic.net>
Subject: Re: [PATCH v2 1/3] OMAP: PM: initial runtime PM core support
Date: Mon, 28 Jun 2010 14:49:23 -0700	[thread overview]
Message-ID: <87d3vaygik.fsf@deeprootsystems.com> (raw)
In-Reply-To: <AANLkTimB0_OfLDvtkwwTE-kVeZrardIxVIsD5IEia-vL@mail.gmail.com> (Grant Likely's message of "Fri, 25 Jun 2010 17:04:13 -0600")

Grant Likely <grant.likely@secretlab.ca> writes:

> On Fri, Jun 25, 2010 at 4:46 PM, Kevin Hilman
> <khilman@deeprootsystems.com> wrote:
>> Grant Likely <grant.likely@secretlab.ca> writes:
>>
>>> Another way to look at the problem is that these runtime
>>> customizations are kind of a property of the parent device (the bus,
>>> not the bus_type).  Would it make sense for parent devices to have
>>> runtime ops to perform for each child that is suspended/resumed?  That
>>> would make it simple to register another device that implements the
>>> bus behaviour and attach it at runtime instead of compile time.
>>
>> Maybe I didn't fully understand your idea, but the problem here is
>> devices do not have dev_pm_ops.  Only busses, classes, and types have
>> dev_pm_ops.
>
> Sorry, I mistyped.  What I meant was for the parent device's
> device_driver to be able to have a set of child dev_pm_ops; but I'm
> wading into territory (power management) I'm not particularly familiar
> with, and that might be making things far too complex.

I see your point now, but I think this indeed might complicate things
too much.  

Also, I'm not crazy about how this would delay the per-device PM hooks
to be essentially batched until all devices under the parent are
"ready."

But anyways, it just needs some more research on my part.
Unfortunately, I'll be away from this work on vacation for most of July,
so this won't get any attention from me until August.

>> Though I'm horribly unfamiliar with the intended usage of 'struct
>> device_type', an interesing discovery is that dev->type also has
>> dev_pm_ops, and it takes precedence over the bus type in the
>> suspend/resume.  IOW, when suspending, when deciding which dev_pm_ops to
>> use, it checks class, type, then bus in that order.
>
> So I guess my suggestion above boils down to somehow inserting
> "parent" between type and bus in that list.
>
>> I need to explore this 'type' feature a little more, but using that or
>> the 'class' might be another way to have custom PM ops for certain
>> platform_devices.
>
> Should maybe start cc'ing Greg and linux-kernel/linux-pm in this discussion.

They were involved in the early discussions about overriding the
platform_bus dev_pm_ops methods, which led us to the current
implementation.

But as I explore the custom bus approach a bit more (in August) I'll
broaden the audience.

Thanks again for all your helpful suggestions,

Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2010-06-28 21:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-24 23:43 [PATCH v2 0/3] OMAP: add runtime PM support at bus-level Kevin Hilman
2010-06-24 23:43 ` [PATCH v2 1/3] OMAP: PM: initial runtime PM core support Kevin Hilman
2010-06-25 15:26   ` Grant Likely
2010-06-25 18:04     ` Kevin Hilman
2010-06-25 20:08       ` Grant Likely
2010-06-25 21:58         ` Kevin Hilman
2010-06-25 22:30           ` Grant Likely
2010-06-25 22:46         ` Kevin Hilman
2010-06-25 23:04           ` Grant Likely
2010-06-28 21:49             ` Kevin Hilman [this message]
2010-06-28 22:14               ` Grant Likely
2010-06-28 23:27         ` Kevin Hilman
2010-06-28 23:47           ` Grant Likely
2010-06-25 20:06     ` Russell King - ARM Linux
2010-06-25 20:13       ` Grant Likely
2010-06-25 20:20         ` Russell King - ARM Linux
2010-06-25 23:46           ` Nicolas Pitre
2010-06-26 10:51             ` Uwe Kleine-König
2010-06-26 11:07               ` Russell King - ARM Linux
2010-08-04 22:55   ` Grant Likely
2010-06-24 23:43 ` [PATCH v2 2/3] OMAP: bus-level PM: enable use of runtime PM API for suspend/resume Kevin Hilman
2010-06-24 23:43 ` [PATCH v2 3/3] OMAP1: PM: add simple runtime PM layer to manage clocks Kevin Hilman

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=87d3vaygik.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=eric.miao@canonical.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=nico@fluxnic.net \
    /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).