ACPI: thinkpad-acpi: add CMOS NVRAM polling for hot keysv2.6.23-rc6+thinkpad-acpi-20070916
commitec2e26f23f3ecff332a703738319176d82218b0f
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 16 Sep 2007 10:55:40 +0000 (16 07:55 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Tue, 18 Sep 2007 03:43:15 +0000 (18 00:43 -0300)
treecf2b3f69688501eda4dc1e4b89b1f96c433ad1f2
parent22e54d09665371a171e8f0de5ea63cbf85e1d712
ACPI: thinkpad-acpi: add CMOS NVRAM polling for hot keys

Older ThinkPad models do not export some of the hot keys over the
event-based ACPI hot key interface.  For these models, one has to poll the
CMOS NVRAM to check the key state at a rate faster than the expected rate
at which the user might repeatedly press the same hot key.

This patch implements this functionality for many of the hotkeys in a
transparent way: hot keys will now Just Work, and the driver knows the best
approach (events or NVRAM polling) to employ, based on the HKEY.MHKA ACPI
method.

Also, the driver can turn off the polling when there are no users for the
hot keys that need such polling.

The NVRAM-based hot keys of the A3x series that have never been implemented
by later models are not supported, to avoid changes in the keymap of the
input devices that could cause headaches in the future.

This patch is based on a previous effort by Richard Hughes.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Richard Hughes <hughsient@gmail.com>
Documentation/thinkpad-acpi.txt
drivers/misc/thinkpad_acpi.c
drivers/misc/thinkpad_acpi.h