lkml.org 
[lkml]   [2014]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] spi/atmel: add support for runtime PM
Date


> -----Original Message-----
> From: Kevin Hilman [mailto:khilman@kernel.org]
> Sent: Friday, October 17, 2014 10:22 PM
> To: Mark Brown
> Cc: Yang, Wenyou; linux-spi@vger.kernel.org; linux-kernel@vger.kernel.org; Ferre,
> Nicolas; linux-arm-kernel@lists.infradead.org
> Subject: Re: [PATCH] spi/atmel: add support for runtime PM
>
> 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.
But if the runtime PM is disabled, __pm_runtime_idle() return -ENOSYS, which invoked by pm_runtime_put_sync(), in spite of the runtime suspend/resume functions wrapper,

>
> Kevin

Best Regards,
Wenyou Yang


\
 
 \ /
  Last update: 2014-10-20 04:21    [W:0.316 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site