Re: [PATCH] rtc: disable the alarm in the hardware

From: John Stultz
Date: Tue Nov 22 2011 - 15:32:28 EST


On Tue, 2011-11-22 at 11:03 +0100, Linus Walleij wrote:
> From: Rabin Vincent <rabin.vincent@xxxxxxxxxxxxxx>
>
> Currently, the RTC code does not disable the alarm in the hardware.
>
> This means that after a sequence such as the one below (the files are in the
> RTC sysfs), the box will boot up after 2 minutes even though we've
> asked for the alarm to be turned off.
>
> # echo $((`cat since_epoch`)+120) > wakealarm
> # echo 0 > wakealarm
> # poweroff
>
> Fix this by disabling the alarm when there are no timers to run.

Hey Linus,
Thanks for sending this along! It looks like a good fix to me! I'm a
little amazed this hasn't cropped up sooner. I'll do some further
testing and then queue it for upstream.

thanks
-john


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/