• Rabin Vincent's avatar
    rtc: Disable the alarm in the hardware (v2) · 63d1c866
    Rabin Vincent authored
    commit 41c7f742 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: default avatarRabin Vincent <rabin.vincent@stericsson.com>
    [Merged in the second revision from Rabin]
    Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    63d1c866
interface.c 22.8 KB