ACPI: thinkpad-acpi: add CMOS NVRAM polling for hot keys (v9)
commitc4a2ce1fc2381fc70661497a2b4f6fb7ad43f99d
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 2 Dec 2007 19:33:12 +0000 (2 17:33 -0200)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Tue, 26 Feb 2008 02:34:10 +0000 (25 23:34 -0300)
treec50d0fef80057936812b708d8d2558324d8b79a5
parent6f462d648d788724f42b2ceaba7ccf30c60eaafd
ACPI: thinkpad-acpi: add CMOS NVRAM polling for hot keys (v9)

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.

There is a Kconfig option to avoid compiling the NVRAM polling code, as
it is not very small, and unlikely to be useful on any ThinkPad newer
than a T40, X31 or R52.

This feature 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/Kconfig
drivers/misc/thinkpad_acpi.c
drivers/misc/thinkpad_acpi.h