]> err.no Git - linux-2.6/commit
rtc: add the support for alarm time relative to current time in sysfs
authorZhao Yakui <yakui.zhao@intel.com>
Mon, 28 Apr 2008 09:11:58 +0000 (02:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 28 Apr 2008 15:58:17 +0000 (08:58 -0700)
commitc116bc2ae516e9949d645bc75b1ee294ff15db23
tree9296da3e37dfc8f80566624faf781f19d41ea9f1
parente2bfe3424b368e977002fc58f81536d5d8ea9449
rtc: add the support for alarm time relative to current time in sysfs

In current kernel if we want to set the alarm time, the absolute time the
seconds relative to 1970-01-01 00:00:00) should be written into
/sys/class/rtc/rtc0/wakealarm.  It is not convenient.

It is more reasonable to add the support for the alarm time relative to
current RTC time.(the unit is second)

For example:
If the RTC is required to generate alarm after 2 minutes, the following
will be OK.
echo +120 > /sys/class/rtc/rtc0/wakealarm
or      echo +0x78 > /sys/class/rtc/rtc0/wakealarm

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-sysfs.c