]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
rtc: Disable the alarm in the hardware (v2)
authorRabin Vincent <rabin.vincent@stericsson.com>
Tue, 22 Nov 2011 10:03:14 +0000 (11:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Apr 2012 16:27:10 +0000 (09:27 -0700)
commit220b62b4dae194046a0993d66c5a7651fcfed72e
tree140426fc95a753ea9ecf8a5d44239568e4c16ff8
parente48530f745181c8af0c17c4e89ac4803742a1a4c
rtc: Disable the alarm in the hardware (v2)

commit 41c7f7424259ff11009449f87c95656f69f9b186 upstream.

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.

The original version of this patch was reverted. This version
disables the irq directly instead of setting a disabled timer
in the future.

Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
[Merged in the second revision from Rabin]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/rtc/interface.c