[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7hd29qhj3i.fsf@deeprootsystems.com>
Date: Fri, 17 Oct 2014 07:22:09 -0700
From: Kevin Hilman <khilman@...nel.org>
To: Mark Brown <broonie@...nel.org>
Cc: Wenyou Yang <wenyou.yang@...el.com>, linux-spi@...r.kernel.org,
linux-kernel@...r.kernel.org, nicolas.ferre@...el.com,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] spi/atmel: add support for runtime PM
Mark Brown <broonie@...nel.org> writes:
> On Fri, Oct 17, 2014 at 06:02:35AM -0700, Kevin Hilman wrote:
>> Wenyou Yang <wenyou.yang@...el.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists