ACPI: button: register with input layer
authorDmitry Torokhov <dtor@insightbb.com>
Thu, 9 Nov 2006 05:40:13 +0000 (00:40 -0500)
committerLen Brown <len.brown@intel.com>
Thu, 9 Nov 2006 08:20:19 +0000 (03:20 -0500)
In addition to signalling button/lid events through /proc/acpi/event,
create separate input devices and report KEY_POWER, KEY_SLEEP and
SW_LID through input layer.  Also remove unnecessary casts and variable
initializations, clean up formatting.

Sleep button may autorepeat but userspace will have to filter duplicate
sleep requests anyway (and discard unprocessed events right after
wakeup).

Unlike /proc/acpi/event interface input device corresponding to LID
switch reports true lid state instead of just a counter. SW_LID is
active when lid is closed.

The driver now depends on CONFIG_INPUT.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Len Brown <len.brown@intel.com>

No differences found