ACPI: thinkpad-acpi: add CMOS NVRAM polling for hot keys (v2)
commit2617e29659c35f51e630f177b8cef399bad3f908
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 23 Sep 2007 02:25:47 +0000 (22 23:25 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sat, 22 Sep 2007 23:29:24 +0000 (22 20:29 -0300)
treefda21f6a0176c00052c138e08dd9cd1736b35768
parent6f0af9803027c999e3389b2f108cc7168f180756
ACPI: thinkpad-acpi: add CMOS NVRAM polling for hot keys (v2)

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