Re: [linux-pm] [PATCH 3/6] [-mm]: ACPI: duplicate ACPI sleep "alarm" attribute in sysfs

Pavel Machek
2007-01-08T11:36:12Z

Hi!

> > > Create /sys/power/alarm.
> > > The way it works is exactly the same as /proc/acpi/alarm.
> > > I.e. "#echo yyyy-mm-dd hh-mm-ss >/sys/power/alarm" supports existing absolute time.
> > > And "#echo +yyyy-mm-dd hh-mm-ss >/sys/power/alarm" supports a duration.
> >
> > NAK. /proc/acpi/alarm is a mess, and this just moves it to /sysfs.
> > 'One value per file', please.
>
> Sort of like the appended patch, instead ... which doesn't need to know a
> thing about ACPI. This is what I suggested in response to an earlier patch
> from Paul Sokolovsky.

Yes, I suspected your patches would be solving this one.

> - 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.

...and it is certainly way better than original (parsing)
solution. ACK.

(What about periodic alarms? I guess we want to simply forget about
them? Doc*/ file would be nice, but you probably have that in separate
patch.)
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html