From: Kevin Hilman <khilman@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Wenyou Yang <wenyou.yang@atmel.com>,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
nicolas.ferre@atmel.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] spi/atmel: add support for runtime PM
Date: Fri, 17 Oct 2014 07:22:09 -0700 [thread overview]
Message-ID: <7hd29qhj3i.fsf@deeprootsystems.com> (raw)
In-Reply-To: <20141017135716.GS1820@sirena.org.uk> (Mark Brown's message of "Fri, 17 Oct 2014 15:57:16 +0200")
Mark Brown <broonie@kernel.org> writes:
> On Fri, Oct 17, 2014 at 06:02:35AM -0700, Kevin Hilman wrote:
>> Wenyou Yang <wenyou.yang@atmel.com> writes:
>
>> > + if (!pm_runtime_suspended(dev)) {
>> > + clk_disable_unprepare(as->clk);
>> > + pinctrl_pm_select_sleep_state(dev);
>> > + }
>
>> a.k.a. pm_runtime_put_sync() since the ->runtime_suspend() callback does
>> the same thing.
>
> Will that do the right thing when runtime PM is disabled in Kconfig?
Good point.
Then the way to make this cleaner, and obvious on inspection that system
suspend/resume are doing the same thing as runtime suspend/resume is to
have ->suspend call the runtime_suspend function.
The runtime suspend/resume functions then should be wrapped in CONFIG_PM
instead of CONFIG_PM_RUNTIME.
Kevin
next prev parent reply other threads:[~2014-10-17 14:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-16 1:49 [PATCH] spi/atmel: add support for runtime PM Wenyou Yang
2014-10-16 7:30 ` Mark Brown
2014-10-16 8:09 ` Yang, Wenyou
2014-10-17 13:02 ` Kevin Hilman
2014-10-17 13:57 ` Mark Brown
2014-10-17 14:22 ` Kevin Hilman [this message]
2014-10-17 14:31 ` Mark Brown
2014-10-20 2:05 ` Yang, Wenyou
2014-10-20 18:09 ` Kevin Hilman
2014-10-21 0:51 ` Yang, Wenyou
2014-10-20 1:59 ` Yang, Wenyou
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=7hd29qhj3i.fsf@deeprootsystems.com \
--to=khilman@kernel.org \
--cc=broonie@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=wenyou.yang@atmel.com \
/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).