diff options
author | Len Brown <len.brown@intel.com> | 2007-09-17 00:58:40 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-09-17 00:58:40 -0400 |
commit | ecfe7f093768f7af0959f5be8ec039dcc29724af (patch) | |
tree | ab81bdef45d726134a76d65d930918a402efc00f /Documentation | |
parent | 95e3f66fa60a8e573b0b7a58305c5c9fcbca1b70 (diff) | |
parent | 3b0c6485a733f5f0f5c362fb094df1466b18ab93 (diff) |
Pull thinkpad into release branch
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/thinkpad-acpi.txt | 96 |
1 files changed, 77 insertions, 19 deletions
diff --git a/Documentation/thinkpad-acpi.txt b/Documentation/thinkpad-acpi.txt index eb2f5986e1eb..60953d6c919d 100644 --- a/Documentation/thinkpad-acpi.txt +++ b/Documentation/thinkpad-acpi.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | ThinkPad ACPI Extras Driver | 1 | ThinkPad ACPI Extras Driver |
2 | 2 | ||
3 | Version 0.15 | 3 | Version 0.16 |
4 | July 1st, 2007 | 4 | August 2nd, 2007 |
5 | 5 | ||
6 | Borislav Deianov <borislav@users.sf.net> | 6 | Borislav Deianov <borislav@users.sf.net> |
7 | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 7 | Henrique de Moraes Holschuh <hmh@hmh.eng.br> |
@@ -161,20 +161,22 @@ system. Enabling the hotkey functionality of thinkpad-acpi signals the | |||
161 | firmware that such a driver is present, and modifies how the ThinkPad | 161 | firmware that such a driver is present, and modifies how the ThinkPad |
162 | firmware will behave in many situations. | 162 | firmware will behave in many situations. |
163 | 163 | ||
164 | The driver enables the hot key feature automatically when loaded. The | ||
165 | feature can later be disabled and enabled back at runtime. The driver | ||
166 | will also restore the hot key feature to its previous state and mask | ||
167 | when it is unloaded. | ||
168 | |||
164 | When the hotkey feature is enabled and the hot key mask is set (see | 169 | When the hotkey feature is enabled and the hot key mask is set (see |
165 | below), the various hot keys either generate ACPI events in the | 170 | below), the driver will report HKEY events in the following format: |
166 | following format: | ||
167 | 171 | ||
168 | ibm/hotkey HKEY 00000080 0000xxxx | 172 | ibm/hotkey HKEY 00000080 0000xxxx |
169 | 173 | ||
170 | or events over the input layer. The input layer support accepts the | 174 | Some of these events refer to hot key presses, but not all. |
171 | standard IOCTLs to remap the keycodes assigned to each hotkey. | ||
172 | 175 | ||
173 | When the input device is open, the driver will suppress any ACPI hot key | 176 | The driver will generate events over the input layer for hot keys and |
174 | events that get translated into a meaningful input layer event, in order | 177 | radio switches, and over the ACPI netlink layer for other events. The |
175 | to avoid sending duplicate events to userspace. Hot keys that are | 178 | input layer support accepts the standard IOCTLs to remap the keycodes |
176 | mapped to KEY_RESERVED in the keymap are not translated, and will always | 179 | assigned to each hot key. |
177 | generate an ACPI ibm/hotkey HKEY event, and no input layer events. | ||
178 | 180 | ||
179 | The hot key bit mask allows some control over which hot keys generate | 181 | The hot key bit mask allows some control over which hot keys generate |
180 | events. If a key is "masked" (bit set to 0 in the mask), the firmware | 182 | events. If a key is "masked" (bit set to 0 in the mask), the firmware |
@@ -256,6 +258,20 @@ sysfs notes: | |||
256 | disabled" postition, and 1 if the switch is in the | 258 | disabled" postition, and 1 if the switch is in the |
257 | "radios enabled" position. | 259 | "radios enabled" position. |
258 | 260 | ||
261 | hotkey_report_mode: | ||
262 | Returns the state of the procfs ACPI event report mode | ||
263 | filter for hot keys. If it is set to 1 (the default), | ||
264 | all hot key presses are reported both through the input | ||
265 | layer and also as ACPI events through procfs (but not | ||
266 | through netlink). If it is set to 2, hot key presses | ||
267 | are reported only through the input layer. | ||
268 | |||
269 | This attribute is read-only in kernels 2.6.23 or later, | ||
270 | and read-write on earlier kernels. | ||
271 | |||
272 | May return -EPERM (write access locked out by module | ||
273 | parameter) or -EACCES (read-only). | ||
274 | |||
259 | input layer notes: | 275 | input layer notes: |
260 | 276 | ||
261 | A Hot key is mapped to a single input layer EV_KEY event, possibly | 277 | A Hot key is mapped to a single input layer EV_KEY event, possibly |
@@ -393,21 +409,63 @@ unknown by the driver if the ThinkPad firmware triggered these events on | |||
393 | hot key press or release, but the firmware will do it for either one, not | 409 | hot key press or release, but the firmware will do it for either one, not |
394 | both. | 410 | both. |
395 | 411 | ||
396 | If a key is mapped to KEY_RESERVED, it generates no input events at all, | 412 | If a key is mapped to KEY_RESERVED, it generates no input events at all. |
397 | and it may generate a legacy thinkpad-acpi ACPI hotkey event. | ||
398 | |||
399 | If a key is mapped to KEY_UNKNOWN, it generates an input event that | 413 | If a key is mapped to KEY_UNKNOWN, it generates an input event that |
400 | includes an scan code, and it may also generate a legacy thinkpad-acpi | 414 | includes an scan code. If a key is mapped to anything else, it will |
401 | ACPI hotkey event. | 415 | generate input device EV_KEY events. |
402 | |||
403 | If a key is mapped to anything else, it will only generate legacy | ||
404 | thinkpad-acpi ACPI hotkey events if nobody has opened the input device. | ||
405 | 416 | ||
406 | Non hot-key ACPI HKEY event map: | 417 | Non hot-key ACPI HKEY event map: |
407 | 0x5001 Lid closed | 418 | 0x5001 Lid closed |
408 | 0x5002 Lid opened | 419 | 0x5002 Lid opened |
409 | 0x7000 Radio Switch may have changed state | 420 | 0x7000 Radio Switch may have changed state |
410 | 421 | ||
422 | The above events are not propagated by the driver, except for legacy | ||
423 | compatibility purposes when hotkey_report_mode is set to 1. | ||
424 | |||
425 | Compatibility notes: | ||
426 | |||
427 | ibm-acpi and thinkpad-acpi 0.15 (mainline kernels before 2.6.23) never | ||
428 | supported the input layer, and sent events over the procfs ACPI event | ||
429 | interface. | ||
430 | |||
431 | To avoid sending duplicate events over the input layer and the ACPI | ||
432 | event interface, thinkpad-acpi 0.16 implements a module parameter | ||
433 | (hotkey_report_mode), and also a sysfs device attribute with the same | ||
434 | name. | ||
435 | |||
436 | Make no mistake here: userspace is expected to switch to using the input | ||
437 | layer interface of thinkpad-acpi, together with the ACPI netlink event | ||
438 | interface in kernels 2.6.23 and later, or with the ACPI procfs event | ||
439 | interface in kernels 2.6.22 and earlier. | ||
440 | |||
441 | If no hotkey_report_mode module parameter is specified (or it is set to | ||
442 | zero), the driver defaults to mode 1 (see below), and on kernels 2.6.22 | ||
443 | and earlier, also allows one to change the hotkey_report_mode through | ||
444 | sysfs. In kernels 2.6.23 and later, where the netlink ACPI event | ||
445 | interface is available, hotkey_report_mode cannot be changed through | ||
446 | sysfs (it is read-only). | ||
447 | |||
448 | If the hotkey_report_mode module parameter is set to 1 or 2, it cannot | ||
449 | be changed later through sysfs (any writes will return -EPERM to signal | ||
450 | that hotkey_report_mode was locked. On 2.6.23 and later, where | ||
451 | hotkey_report_mode cannot be changed at all, writes will return -EACES). | ||
452 | |||
453 | hotkey_report_mode set to 1 makes the driver export through the procfs | ||
454 | ACPI event interface all hot key presses (which are *also* sent to the | ||
455 | input layer). This is a legacy compatibility behaviour, and it is also | ||
456 | the default mode of operation for the driver. | ||
457 | |||
458 | hotkey_report_mode set to 2 makes the driver filter out the hot key | ||
459 | presses from the procfs ACPI event interface, so these events will only | ||
460 | be sent through the input layer. Userspace that has been updated to use | ||
461 | the thinkpad-acpi input layer interface should set hotkey_report_mode to | ||
462 | 2. | ||
463 | |||
464 | Hot key press events are never sent to the ACPI netlink event interface. | ||
465 | Really up-to-date userspace under kernel 2.6.23 and later is to use the | ||
466 | netlink interface and the input layer interface, and don't bother at all | ||
467 | with hotkey_report_mode. | ||
468 | |||
411 | 469 | ||
412 | Bluetooth | 470 | Bluetooth |
413 | --------- | 471 | --------- |