From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Cc: Wolfram Sang <w.sang@pengutronix.de>,
Ben Dooks <ben-linux@fluff.org>,
linux-samsung-soc@vger.kernel.org, linux-i2c@vger.kernel.org,
linux-pm@lists.linux-foundation.org
Subject: Re: [PATCH] i2c-s3c2410: Add stub runtime power management
Date: Sun, 22 Jan 2012 15:22:34 +0000 [thread overview]
Message-ID: <20120122152234.GA2915@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4F1C082D.2080005@gmail.com>
On Sun, Jan 22, 2012 at 01:59:25PM +0100, Sylwester Nawrocki wrote:
> On 01/21/2012 07:46 PM, Mark Brown wrote:
> > + pm_runtime_get_sync(&adap->dev);
> IMHO it's more appropriate to use i2c->dev here instead, i.e. to reference
> the platform device we've enabled runtime PM for.
Oh, bah humbug. Now that I notice this I think that's the reason I
enabled runtime PM for the adaptor - it's easier to get hold of.
> How about the following patch (untested) ? It might be a better start for
> proper power management implementation and would still allow the driver
> to work on platforms that don't support runtime PM.
It's not really a platform issue - the platform bus by default does the
right thing and the runtime PM core is pure software, the only platform
dependency is if users have bothered truning runtime PM on.
> +static inline int s3c24xx_pm_runtime_put(struct s3c24xx_i2c *i2c)
> +{
> + if (!pm_runtime_enabled(i2c->dev)) {
> + clk_disable(i2c->clk);
> + return 0;
> + }
> +
> + return pm_runtime_put(i2c->dev);
> +}
To be honest I don't think this is worth it. Either we just keep the
clock management outside of runtime PM or we push it in but trying to
support both simultaneously adds complication and doesn't actually do
all that much in practical terms.
next prev parent reply other threads:[~2012-01-22 15:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1327171600-5489-1-git-send-email-broonie@opensource.wolfsonmicro.com>
2012-01-22 12:59 ` [PATCH] i2c-s3c2410: Add stub runtime power management Sylwester Nawrocki
2012-01-22 15:22 ` Mark Brown [this message]
[not found] ` <20120122152234.GA2915-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-01-22 17:22 ` Sylwester Nawrocki
2012-01-22 17:27 ` Bill Gatliff
2012-01-22 17:48 ` Sylwester Nawrocki
2012-01-22 21:39 ` Mark Brown
2012-01-23 20:19 ` Sylwester Nawrocki
[not found] ` <20120122213952.GA29022-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-02-13 23:31 ` Ben Dooks
[not found] ` <20120213233139.GJ2999-RazCHl0VsYgkUSuvROHNpA@public.gmane.org>
2012-02-14 0:37 ` Mark Brown
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=20120122152234.GA2915@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=ben-linux@fluff.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=sylvester.nawrocki@gmail.com \
--cc=w.sang@pengutronix.de \
/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).