1. 27 Jan, 2012 3 commits
    • Rabin Vincent's avatar
      rtc: Disable the alarm in the hardware (v2) · 41c7f742
      Rabin Vincent authored
      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: stable@kernel.org
      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>
      41c7f742
    • NeilBrown's avatar
      rtc: Expire alarms after the time is set. (v2) · 5f9679d2
      NeilBrown authored
      If the alarm time programming in the rtc is ever in the past, it won't fire,
      and any other alarm will be queued after it so they won't fire either.
      
      So any time that the alarm might be in the past, we need to trigger
      the irq handler to ensure the old alarm is cleared and the timer queue
      is fully in the future.
      
      This is done whenever the RTC clock is set.
      
      This is the second revision of this patch, which was earlier reverted.
      This version avoids the initialization problem, which is handled by
      a different patch.
      Tested-by: default avatarSander Eikelenboom <linux@eikelenboom.it>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      [Remove problematic initialization change, update commit log, also
      catch set_mmss case -jstultz]
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      5f9679d2
    • John Stultz's avatar
      rtc: Avoid setting alarm to a time in the past · bd729d72
      John Stultz authored
      In some cases at boot up, the RTC alarm may be set in the past,
      but still have the enabled flag on. This was causing problems,
      because we would then enqueue the alarm into the timerqueue,
      but it would never fire. This would clog up the timerqueue
      and keep other alarms from working.
      
      The fix is to check the alarm against the current rtc time at
      boot and avoid enqueueing the alarm if it is in the past.
      Reported-by: default avatarNeilBrown <neilb@suse.de>
      Tested-by: default avatarNeilBrown <neilb@suse.de>
      Tested-by: default avatarSander Eikelenboom <linux@eikelenboom.it>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      bd729d72
  2. 23 Jan, 2012 33 commits
  3. 20 Jan, 2012 1 commit
  4. 19 Jan, 2012 3 commits