lkml.org 
[lkml]   [2014]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC][PATCH 2/3] PM / sleep: Mechanism to avoid resuming runtime-suspended devices unnecessarily
Date
On Thursday, May 15, 2014 02:06:59 PM Ulf Hansson wrote:
> > Do we want to allow ->prepare() to return > 0 if the device isn't
> > runtime suspended? If we do then non-suspended devices may be a common
> > case. We should then avoid the extra overhead of disable + enable.
> > So I would write:
> >
> > if (dev->power.direct_complete) {
> > if (pm_runtime_status_suspended(dev)) {
> > pm_runtime_disable(dev);
> > if (dev->power.disable_depth == 1
> > && pm_runtime_status_suspended(dev))
> > goto Complete;
> > pm_runtime_enable(dev);
> > }
> > dev->power.direct_complete = false;
> > }
> >
>
> I am wondering whether the above pm_runtime_disable|enable actually
> belongs better in driver/subsystem in favour of the PM core?

No, it doesn't.

> Doesn't the driver/subsystem anyway needs to be on top of what goes
> on? Typically, while runtime PM has been disabled, that might affect
> it's wakeup handling? Or this case are already handled due to other
> circumstances?

Yes, that's the case.

Thanks!

--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.


\
 
 \ /
  Last update: 2014-05-15 15:01    [W:0.083 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site