[linux-pm] Power Mangement Interfaces
David Brownell
david-b at pacbell.net
Sat Mar 31 12:12:10 EDT 2007
On Friday 30 March 2007 5:21 pm, Johannes Berg wrote:
> Hm, another thing. The RTC alarm wakeup event, wouldn't that require
> programming the time too? And if so, should that be done through the
> power interface to it?
There's already a cross-platform interface to RTC wakeup alarms; no
new interface is needed (or desirable), much less one that requires
any new or modified /sys/power/... files.
- Enable the wakeup event in /sys/devices/.../power/wakeup
(alternate names include /sys/class/rtc/.../device/power/wakeup)
- Userspace can set the alarm using
* /dev/rtcX and one ioctl: RTC_WKALM_SET
* /dev/rtcX and two ioctls: RTC_ALM_SET, then RTC_AIE_ON
* /sys/class/rtc/.../wakealarm
That works on multiple systems already. I've just posted updates
to make it work for "rtc-cmos" on the RTC list.
- Dave
More information about the Devel
mailing list