lkml.org 
[lkml]   [2008]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: acpi/apm events as inputs: how to handle?
Dmitry Torokhov wrote:
> Hi Michael,

Hello!

[]
> There are keyboards (USB, PS2) with Sleep and Suspend buttons
> that are not related to ACPI nor APM. We had 2 options - add
> an input handler that would translate input events into ACPI
> events and feed /proc/acpi/event[*] or go other way around and
> use input layer for delivering suspend and sleep requests for
> all types of keyboards/buttons, including ACPI buttons. The
> secons option is better because userspace solution using input
> layer will not be tied to a particular technology (ACPI) and
> can be used on other platforms as well.

Aha, this makes sense.
And it brings a few questions, too.

As far as I can see, there's little information about how to
actually use the input interface. Let's suppose I'm about to
write an application (a daemon) that should replace acpid --
it's handling of the said buttons (power and sleep). How to
find the right devices? Should it use /dev/input/event* or
something else? How about handling hot-plugged devices like
new (and removed) keyboards? (And yes, my keyboard has a sleep
button.)

And by the way, what INPUT can one expect from a PC speaker?
input: PC Speaker as /devices/platform/pcspkr/input/input0

Thanks!

/mjt


\
 
 \ /
  Last update: 2008-01-07 11:45    [W:0.061 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site