Best practices to improve a laptop driver using ACPI (hotkeys, rfkill, kill switch...)
Fabien Crespel <fabien <at> crespel.net>
2008-03-14 23:41:09 GMT
Hello,
as an ASUS laptop owner, quite new to Linux kernel driver programming but long
time programmer, I'm interested in improving the asus-laptop driver in several
ways, with anyone that might be interested in the process (and of course
especially the maintainer, Corentin Chary).
But for this, I would first like to know what the "best practices" are, to avoid
design mistakes. So here I come with many questions and unclear points I'd like
to define a bit better. Sorry if some questions have already been answered
elsewhere, but if they haven't, maybe the resulting discussion will also be
useful for other laptop drivers :)
___ INTRODUCTION _______________________________________________________________
Before asking anything, let me explain quickly how things work on ASUS laptops:
- hotkeys use ACPI notifications catched by the driver with a notify handler.
- there are several "operation modes" in most DSDTs, controlled by the CWAP
method / WAPF variable:
0 = no driver (behavior hardcoded in the DSDT),
1 = half-driver, half-hardware (current default in asus-laptop),
4 = pure driver mode (notifications only for most events)
- in all modes, the Bluetooth device and LED (if present) are tied together, i.e.
toggling the LED through an ACPI method (BLED) also toggles the device.
- the WLAN device and LED are more tricky depending on the mode:
0 = tied together on some models,
1 and 4 = only the LED can be toggled with an ACPI method (WLED).
The goals of the proposed driver enhancements are to move to "mode 4" (pure
driver mode) on all ASUS laptops, to support more modern ways of handling things
(Continue reading)