diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/thinkpad-acpi.txt | 89 |
1 files changed, 41 insertions, 48 deletions
diff --git a/Documentation/thinkpad-acpi.txt b/Documentation/thinkpad-acpi.txt index 91d08921a4ca..5b59cf50b2e9 100644 --- a/Documentation/thinkpad-acpi.txt +++ b/Documentation/thinkpad-acpi.txt | |||
@@ -155,52 +155,47 @@ Hot keys | |||
155 | procfs: /proc/acpi/ibm/hotkey | 155 | procfs: /proc/acpi/ibm/hotkey |
156 | sysfs device attribute: hotkey_* | 156 | sysfs device attribute: hotkey_* |
157 | 157 | ||
158 | Without this driver, only the Fn-F4 key (sleep button) generates an | 158 | In a ThinkPad, the ACPI HKEY handler is responsible for comunicating |
159 | ACPI event. With the driver loaded, the hotkey feature enabled and the | 159 | some important events and also keyboard hot key presses to the operating |
160 | mask set (see below), the various hot keys generate ACPI events in the | 160 | system. Enabling the hotkey functionality of thinkpad-acpi signals the |
161 | firmware that such a driver is present, and modifies how the ThinkPad | ||
162 | firmware will behave in many situations. | ||
163 | |||
164 | 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 | ||
161 | following format: | 166 | following format: |
162 | 167 | ||
163 | ibm/hotkey HKEY 00000080 0000xxxx | 168 | ibm/hotkey HKEY 00000080 0000xxxx |
164 | 169 | ||
165 | The last four digits vary depending on the key combination pressed. | 170 | or events over the input layer. The input layer support accepts the |
166 | All labeled Fn-Fx key combinations generate distinct events. In | 171 | standard IOCTLs to remap the keycodes assigned to each hotkey. |
167 | addition, the lid microswitch and some docking station buttons may | ||
168 | also generate such events. | ||
169 | |||
170 | Hot keys also generate regular keyboard key press/release events through | ||
171 | the input layer in addition to the ibm/hotkey ACPI events. The input | ||
172 | layer support accepts the standard IOCTLs to remap the keycodes assigned | ||
173 | to each hotkey. | ||
174 | 172 | ||
175 | When the input device is open, the driver will suppress any ACPI hot key | 173 | When the input device is open, the driver will suppress any ACPI hot key |
176 | events that get translated into a meaningful input layer event, in order | 174 | events that get translated into a meaningful input layer event, in order |
177 | to avoid sending duplicate events to userspace. Hot keys that are | 175 | to avoid sending duplicate events to userspace. Hot keys that are |
178 | mapped to KEY_RESERVED are not translated, and will always generate only | 176 | mapped to KEY_RESERVED in the keymap are not translated, and will always |
179 | ACPI hot key event, and no input layer events. | 177 | generate an ACPI ibm/hotkey HKEY event, and no input layer events. |
180 | 178 | ||
181 | The bit mask allows some control over which hot keys generate ACPI | 179 | The hot key bit mask allows some control over which hot keys generate |
182 | events. Not all bits in the mask can be modified. Not all bits that can | 180 | events. If a key is "masked" (bit set to 0 in the mask), the firmware |
183 | be modified do anything. Not all hot keys can be individually controlled | 181 | will handle it. If it is "unmasked", it signals the firmware that |
184 | by the mask. Some models do not support the mask at all. On those | 182 | thinkpad-acpi would prefer to handle it, if the firmware would be so |
185 | models, hot keys cannot be controlled individually. | 183 | kind to allow it (and it often doesn't!). |
186 | 184 | ||
187 | Note that enabling ACPI events for some keys prevents their default | 185 | Not all bits in the mask can be modified. Not all bits that can be |
188 | behavior. For example, if events for Fn-F5 are enabled, that key will no | 186 | modified do anything. Not all hot keys can be individually controlled |
189 | longer enable/disable Bluetooth by itself. This can still be done from | 187 | by the mask. Some models do not support the mask at all, and in those |
190 | an acpid handler for the ibm/hotkey event. | 188 | models, hot keys cannot be controlled individually. The behaviour of |
191 | 189 | the mask is, therefore, higly dependent on the ThinkPad model. | |
192 | On some models, even enabling/disabling the entire hot key feature may | 190 | |
193 | change the way some keys behave (e.g. in a T43, Fn+F4 will generate an | 191 | Note that unmasking some keys prevents their default behavior. For |
194 | button/sleep ACPI event if hot keys are disabled, and it will ignore its | 192 | example, if Fn+F5 is unmasked, that key will no longer enable/disable |
195 | mask when hot keys are enabled, so the key always does something. On a | 193 | Bluetooth by itself. |
196 | X40, Fn+F4 respects its mask status, but generates the button/sleep ACPI | 194 | |
197 | event if masked off). | 195 | Note also that not all Fn key combinations are supported through ACPI. |
198 | 196 | For example, on the X40, the brightness, volume and "Access IBM" buttons | |
199 | Note also that not all Fn key combinations are supported through | 197 | do not generate ACPI events even with this driver. They *can* be used |
200 | ACPI. For example, on the X40, the brightness, volume and "Access IBM" | 198 | through the "ThinkPad Buttons" utility, see http://www.nongnu.org/tpb/ |
201 | buttons do not generate ACPI events even with this driver. They *can* | ||
202 | be used through the "ThinkPad Buttons" utility, see | ||
203 | http://www.nongnu.org/tpb/ | ||
204 | 199 | ||
205 | procfs notes: | 200 | procfs notes: |
206 | 201 | ||
@@ -221,7 +216,7 @@ sysfs notes: | |||
221 | key feature status will be restored to this value. | 216 | key feature status will be restored to this value. |
222 | 217 | ||
223 | 0: hot keys were disabled | 218 | 0: hot keys were disabled |
224 | 1: hot keys were enabled | 219 | 1: hot keys were enabled (unusual) |
225 | 220 | ||
226 | hotkey_bios_mask: | 221 | hotkey_bios_mask: |
227 | Returns the hot keys mask when thinkpad-acpi was loaded. | 222 | Returns the hot keys mask when thinkpad-acpi was loaded. |
@@ -236,9 +231,10 @@ sysfs notes: | |||
236 | 1: enables the hot keys feature / feature enabled | 231 | 1: enables the hot keys feature / feature enabled |
237 | 232 | ||
238 | hotkey_mask: | 233 | hotkey_mask: |
239 | bit mask to enable ACPI event generation for each hot | 234 | bit mask to enable driver-handling and ACPI event |
240 | key (see above). Returns the current status of the hot | 235 | generation for each hot key (see above). Returns the |
241 | keys mask, and allows one to modify it. | 236 | current status of the hot keys mask, and allows one to |
237 | modify it. | ||
242 | 238 | ||
243 | hotkey_all_mask: | 239 | hotkey_all_mask: |
244 | bit mask that should enable event reporting for all | 240 | bit mask that should enable event reporting for all |
@@ -250,8 +246,9 @@ sysfs notes: | |||
250 | 246 | ||
251 | hotkey_recommended_mask: | 247 | hotkey_recommended_mask: |
252 | bit mask that should enable event reporting for all | 248 | bit mask that should enable event reporting for all |
253 | supported hot keys, except those which are handled by | 249 | supported hot keys, except those which are always |
254 | the firmware. Echo it to hotkey_mask above, to use. | 250 | handled by the firmware anyway. Echo it to |
251 | hotkey_mask above, to use. | ||
255 | 252 | ||
256 | hotkey_radio_sw: | 253 | hotkey_radio_sw: |
257 | if the ThinkPad has a hardware radio switch, this | 254 | if the ThinkPad has a hardware radio switch, this |
@@ -390,10 +387,6 @@ ACPI hotkey event. | |||
390 | If a key is mapped to anything else, it will only generate legacy | 387 | If a key is mapped to anything else, it will only generate legacy |
391 | thinkpad-acpi ACPI hotkey events if nobody has opened the input device. | 388 | thinkpad-acpi ACPI hotkey events if nobody has opened the input device. |
392 | 389 | ||
393 | For userspace backwards-compatibility purposes, the keycode map is | ||
394 | initially filled with KEY_RESERVED and KEY_UNKNOWN mappings for scan codes | ||
395 | 0x00 to 0x10 (and maybe others). | ||
396 | |||
397 | Non hot-key ACPI HKEY event map: | 390 | Non hot-key ACPI HKEY event map: |
398 | 0x5001 Lid closed | 391 | 0x5001 Lid closed |
399 | 0x5002 Lid opened | 392 | 0x5002 Lid opened |