On Wed, Dec 21, 2005 at 07:46:30PM -0800, Todd Poynor wrote: > On Tue, Dec 20, 2005 at 06:11:40PM -0800, Patrick Mochel wrote: > > What about stashing a pointer to the device that did the wakeup, then > > using a symlink to point to the sysfs directory of that device? [ ... ] > > Sounds good, here's a new version that does just that. [ ... ] I'm entering this discussion late, but if I were putting this together: - There would be a single file named /sys/power/wake, - Upon resume, the file would contain lines of plaintext of the format: device: reason - 'device' names the device that performed the wakeup. 'device' could be either a sysfs path or a /dev/blah/blah path (sysfs is probably better, if more verbose, as it remains consistent regardless of how /dev is configured), - 'reason' is free-form text, supplied by the device performing the wakeup, and is entirely device-dependent. This approach allows multiple wakeup sources (rare, but possible), and also allows a single multifunction device to report multiple reasons for a wakeup. It's also darned simple to parse. IMHO, of course. Schwab