ACPI: thinkpad-acpi: switch Lenovo BIOS to ACPI backlight mode
commit21f037c7975b5ec57d1ac745fab45c19bf0d890a
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Tue, 8 Jan 2008 06:56:15 +0000 (8 04:56 -0200)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Wed, 13 Feb 2008 18:57:21 +0000 (13 16:57 -0200)
tree91cda8e199b2f12942f476ab46f2698a12457ecc
parent2d80369c91211ac3b299f5223a6161858ed05ff0
ACPI: thinkpad-acpi: switch Lenovo BIOS to ACPI backlight mode

Lenovo ThinkPads with generic ACPI backlight level control can be easily
set to react to keyboard brightness key presses in a more predictable way
than what they do when in "DOS / bootloader" mode after Linux brings
up the ACPI interface.

The switch to the ACPI backlight mode in the firmware is designed to be
safe to use only as an one way trapdoor.  One is not to force the firmware
to switch back to "DOS/bootloader" mode except by rebooting.  The mode
switch itself is performed by calling any of the ACPI _BCL methods at least
once.

When in ACPI mode, the backlight firmware just issues (standard) events for
the brightness up/down hot key presses, and doesn't touch the hardware.
thinkpad-acpi knows this, and will suppress issuing any backlight change
notifications in the default keymap to avoid double-reporting.

Thus, provided userspace is sane, all should work (and *keep* working),
which is more that can be said about the non-ACPI mode of the new Lenovo
ThinkPad BIOSes when coupled to current userspace and X.org drivers.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
drivers/misc/thinkpad_acpi.c