Skip to content
Commit c116bc2a authored by Zhao Yakui's avatar Zhao Yakui Committed by Linus Torvalds
Browse files

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: default avatarZhao Yakui <yakui.zhao@intel.com>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e2bfe342
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment