1. 09 5月, 2007 2 次提交
  2. 13 2月, 2007 1 次提交
    • D
      [PATCH] RTC gets sysfs wakealarm attribute · 3925a5ce
      David Brownell 提交于
      This adds a new "wakealarm" sysfs attribute to RTC class devices which support
      alarm operations and are wakeup-capable:
      
       - It reads as either empty, or the scheduled alarm time as seconds
         since the POSIX epoch.  (That time may already have passed, since
         nothing currently enforces one-shot alarm semantics.)
      
       - It can be written with an alarm time in the future, again seconds
         since the POSIX epoch, which enables the alarm.
      
       - It can be written with an alarm time not in the future (such as 0,
         the start of the POSIX epoch) to disable the alarm.
      
      Usage examples (some need GNU date) after "cd /sys/class/rtc/rtcN":
      
          alarm after 10 minutes:
      	# echo $(( $(cat since_epoch) + 10 * 60 )) > wakealarm
          alarm tuesday evening 10pm:
      	# date -d '10pm tuesday' "+%s" > wakealarm
          disable alarm:
          	# echo 0 > wakealarm
      
      This resembles the /proc/acpi/alarm file in that nothing happens when the
      alarm triggers ...  except possibly waking the system from sleep.  It's also
      like that in a nasty way: not much can be done to prevent one task from
      clobbering another task's alarm settings.
      
      It differs from that file in that there's no in-kernel date parser.
      
      Note that a few RTCs ignore rtc_wkalrm.enabled when setting alarms, or aren't
      set up correctly, so they won't yet behave with this attribute.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Acked-by: NPavel Machek <pavel@ucw.cz>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3925a5ce
  3. 27 1月, 2007 1 次提交
  4. 14 12月, 2006 1 次提交
  5. 02 10月, 2006 1 次提交
  6. 01 10月, 2006 1 次提交
  7. 28 3月, 2006 1 次提交