From: Mark Brown <broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
To: "Rafael J. Wysocki" <rjw-KKrjLPT3xs0@public.gmane.org>
Cc: Linus Walleij
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Magnus Damm <magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
Ben Dooks <ben-i2c-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Jonas Aaberg
<jonas.aberg-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>,
Rickard ANDERSSON
<rickard.andersson-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>,
Rabin VINCENT
<rabin.vincent-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
Subject: Re: [PATCH RESEND] i2c/nomadik: runtime PM support
Date: Thu, 3 May 2012 14:39:07 +0100 [thread overview]
Message-ID: <20120503133907.GG3955@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <201205031459.25262.rjw-KKrjLPT3xs0@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1660 bytes --]
On Thu, May 03, 2012 at 02:59:25PM +0200, Rafael J. Wysocki wrote:
> On Thursday, May 03, 2012, Linus Walleij wrote:
> > If *all* runtime_resume() hooks for *all* devices in the same power
> > domain are called at this time on the way up/down we get a major
> > overhead as our primary power domain is pretty big.
> FWIW, in the generic PM domains framework used on the sh7372 platform we have
> a need_restore flag whose meaning is whether or not to call .runtime_suspend()
> (or its domain-specific counterpart) when the domain is about to be powered
> off and .runtime_resume() when the device is resumed by the runtime PM
> framework. Those two callbacks are meant to save and restore the device's
> state, respectively, and there are two more domain-specific callbacks,
> .stop() and .start() that (in the case of sh7372) manipiulate the devices'
> clocks.
> So, if pm_runtime_suspend() is called for a device, we first check if it's OK
> to call .stop() for it (according to PM QoS constraints), but we don't call
> .runtime_suspend() for it yet at this point. Next, we check if it's OK to
> power off the domain containing the device (taking PM QoS constraints and
> subdomains into consideration) and if we decide to do that, we call
> .runtime_suspend() for the devices in the domain, but only those whose
> need_restore flags are unset. Then, if pm_runtime_resume() is called for
> one of the devices, we check its need_restore flag and call .runtime_resume()
> for the device if the flag set and .start() is called subsequently.
This seems like a really useful idiom in general - might it be worth
supporting as a standard framework feature?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-05-03 13:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-08 13:30 [PATCH RESEND] i2c/nomadik: runtime PM support Linus Walleij
[not found] ` <1331213407-10135-1-git-send-email-linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
2012-03-08 14:41 ` Mark Brown
2012-03-19 11:35 ` Linus Walleij
[not found] ` <CACRpkdbQRB37kYfCwn6+xUxBkVVo9f3RwUk5pstVPcfK8bivZw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-19 11:36 ` Linus Walleij
2012-04-10 11:03 ` Linus Walleij
[not found] ` <CACRpkdafU2Awaxx-2dXT_Z8S+dySx6YoV174rxJvdix81TBBpg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-04-17 14:39 ` Wolfram Sang
[not found] ` <20120417143901.GA22406-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-04-17 14:41 ` Mark Brown
2012-04-18 6:39 ` Magnus Damm
[not found] ` <CANqRtoTbW2ew9ZwYmdJAaiD5qujZ-43eCfT=myDQdeYScwiBzQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-04-19 11:16 ` Wolfram Sang
[not found] ` <20120419111635.GE2206-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-04-19 17:07 ` Linus Walleij
2012-05-03 9:03 ` Linus Walleij
[not found] ` <CACRpkdbj+cF7d_=QmqtXTGS4s3Jrr7vxnrt5VbHMDO=an_cVow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-05-03 11:15 ` Mark Brown
2012-05-03 12:59 ` Rafael J. Wysocki
[not found] ` <201205031459.25262.rjw-KKrjLPT3xs0@public.gmane.org>
2012-05-03 13:39 ` Mark Brown [this message]
[not found] ` <20120503133907.GG3955-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-05-03 19:25 ` Rafael J. Wysocki
[not found] ` <201205032125.37631.rjw-KKrjLPT3xs0@public.gmane.org>
2012-05-04 12:58 ` Mark Brown
[not found] ` <20120504125830.GM14230-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-05-04 18:50 ` 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=20120503133907.GG3955@opensource.wolfsonmicro.com \
--to=broonie-yzvpicuk2aatku/dhu1wvuem+bqzidxxqq4iyu8u01e@public.gmane.org \
--cc=ben-i2c-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=jonas.aberg-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=rabin.vincent-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org \
--cc=rickard.andersson-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org \
--cc=rjw-KKrjLPT3xs0@public.gmane.org \
--cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.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