RE: simple userspace pm interface

Grover, Andrew (andrew.grover@intel.com)
Mon, 7 May 2001 17:33:30 -0700


[trimming CC's. Recommend linux-pm-devel@sourceforge.net for followups]

As you mentioned, the ACPI driver does something similar, and I think the
approach is generally sound (or at least we haven't been able to come up
with anything better ;-) I do have the following comments:

- It's probably easier to put the "event" file in proc, instead of dev. This
is what the acpi interface does, and eliminates the mknod step.
- perhaps rename boxevent() to event() or sys_event()?
- Consider putting the subsystem/class identifier first
- Consider hiding the source of the event. For example, we shouldn't care
that the power button press was generated by APM or MIPS64, because we're
going to take the same action, regardless.

I'd encourage you to take a look at the ACPI code that does something
similar (in 2.4.4ac4 or greater, or grab the code from the website at
http://developer.intel.com/technology/iapc/acpi/downloads.htm .)
Specifically, grep -r for bm_osl_generate_event(). Modifying that code to be
more general-purpose could possibly meet ACPI's needs as well as everyone
else's.

Regards -- Andy
ACPI maintainer

> From: John Fremlin [mailto:chief@bandits.org]
> Here is a patch to deal with PM events (e.g. button presses) in a
> system independent way. Could people with the applicable hardware test
> out or comment on the changes?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/