ACPI: thinkpad-acpi: BIOS backlight mode helper (v2)
commit550401188588af1b7a8d181d5dd887a94a3baca6
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>
Tue, 26 Feb 2008 23:37:43 +0000 (26 20:37 -0300)
tree1e16b7dcaf6486605320d6dde54e0e2fb1aa99f3
parentd904260e30d4f11d88f686a9095dc90176d31004
ACPI: thinkpad-acpi: BIOS backlight mode helper (v2)

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 along with the non-standard HKEY
events which thinkpad-acpi traps, and doesn't touch the hardware.

thinkpad-acpi will:

1. Place the ThinkPad firmware in ACPI backlight control mode
   if one is available
2. Suppress HKEY backlight change notifications by default
   to avoid double-reporting when ACPI video is loaded when
   the ThinkPad is in ACPI backlight control mode
3. Urge the user to load the ACPI video driver

The user is free to use either the ACPI video driver to get the brightness
key events, or to override the thinkpad-acpi default hotkey mask to get
them from thinkpad-acpi as well (this will result in duplicate events if
ACPI video is loaded, so let's hope distros won't screw this up).

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.

Full guidelines for backlight hot key reporting and use of the
thinkpad-acpi backlight interface have been added to the documentation.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Thomas Renninger <trenn@suse.de>
Documentation/thinkpad-acpi.txt
drivers/misc/thinkpad_acpi.c