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
Alan Stern <stern@rowland.harvard.edu> writes:

> On Tue, 13 May 2014, Rafael J. Wysocki wrote:
>
>> > A wakeup request from the hardware could cause a runtime resume to
>> > occur at this time. The barrier wouldn't prevent that.
>> >
>> > It's unlikely, I agree, but not impossible.
>>
>> Yeah, I didn't think about that.
>
> Come to think of it, if the hardware sends a wakeup request then it
> must have been enabled for remote wakeup. And if the hardware settings
> are appropriate for system suspend then it must be enabled for system
> wakeup. Consequently a wakeup from the hardware ought to abort the
> system suspend in any case. So maybe we don't care about this
> scenario.
>
> On the other hand, there may be other mechanisms that could cause a
> runtime resume at this inconvenient time. A timer routine, for
> instance.

Another common case is when device X depends on device Y in it's
->prepare or ->suspend path (e.g. need to write to an I2C connected
GPIO/PMIC) in which case, device Y (and the I2C bus) would be runtime
resumed during device X's ->prepare or ->suspend path, and possibly
after device Y (or the I2C busses) ->prepare and ->suspend.

Kevin


\
 
 \ /
  Last update: 2014-05-16 03:41    [W:0.110 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site