Messages in this thread | | | Date | Wed, 26 Nov 2008 17:59:07 +0000 | From | "Alan Jenkins" <> | Subject | Re: Document sysfs interface to RTC system wakeup |
| |
On 11/26/08, Pavel Machek <pavel@suse.cz> wrote: > diff --git a/Documentation/rtc.txt b/Documentation/rtc.txt > index 8deffcd..ac843ab 100644 > --- a/Documentation/rtc.txt > +++ b/Documentation/rtc.txt > @@ -187,6 +187,88 @@ driver returns ENOIOCTLCMD. Some common > > If all else fails, check out the rtc-test.c driver! > > + Even newer /sys interface > + ~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +tino.keitel@gmx.de > +
It's unclear what the purpose of this email address is :).
<snip>
> +cd /proc/acpi > +echo EXP0 > wakeup > +echo PCI1 > wakeup > +echo USB0 > wakeup > +echo USB1 > wakeup > +echo USB2 > wakeup > +echo USB7 > wakeup > +echo HDEF > wakeup
Can you add a comment before this block, something like
# Toggle example wakeup devices # "cat wakeup" will show the list of devices on your specific system, and their current state
There are two points here
1) This part of the example depends on the exact system. AFAIK the BIOS is free to call the devices whatever it likes.
2) These commands *toggle* the enabled state of the relevant wakeup device. If you naively wrote a script based on this example, it _might_ work once. It would probably fail the second time, because it would disable all the devices again.
For added fun, my desktop systems, has a group of wakeup devices which toggle as a single unit. There are six devices in the group, PEX[0-5]. If you do
for i in 0 1 2 3 4 5; do echo PEX$i > wakeup; done
the group toggles 6 times -so the state at the end will be the same as the start! Hopefully readers will read the values back after applying them anyway, so they will notice if anything similarly strange happens.
Alan
| |