lkml.org 
[lkml]   [2012]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] alarmtimer: implement minimum alarm interval for allowing suspend
On 08/09/2012 12:37 AM, Todd Poynor wrote:
> alarmtimer suspend return -EBUSY if the next alarm will fire in less
> than 2 seconds. This allows one RTC seconds tick to occur subsequent
> to this check before the alarm wakeup time is set, ensuring the wakeup
> time is still in the future (assuming the RTC does not tick one more
> second prior to setting the alarm).
>
> If suspend is rejected due to an imminent alarm, hold a wakeup source
> for 2 seconds to process the alarm prior to reattempting suspend.
>
> If setting the alarm incurs an -ETIME for an alarm set in the past,
> or any other problem setting the alarm, abort suspend and hold a
> wakelock for 1 second while the alarm is allowed to be serviced or
> other hopefully transient conditions preventing the alarm clear up.
>
> Signed-off-by: Todd Poynor <toddpoynor@google.com>
> ---
> kernel/time/alarmtimer.c | 18 +++++++++++++-----
> 1 files changed, 13 insertions(+), 5 deletions(-)

Thanks for sending this in!
I've gone ahead and queued it for 3.7 (with the minor tweak Rafael
suggested). I'll try to do some further testing of the edge case this
handles as well.

thanks again,
-john



\
 
 \ /
  Last update: 2012-08-10 00:01    [W:0.050 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site