aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>2007-07-18 22:45:36 -0400
committerLen Brown <len.brown@intel.com>2007-07-21 23:45:56 -0400
commit1a343760b516ca5466d201bec32b1794858b18a5 (patch)
treea3ba178b79e5f17365fac6bbd9aa475e42e102b0 /Documentation
parent6a38abbf2b68e37493f2d5e8702b895a6c23ba0f (diff)
ACPI: thinkpad-acpi: make the input event mode the default
Make the input layer the default way to deal with thinkpad-acpi hot keys, but add a kernel config option to retain the old way of doing things. This means we map a lot more keys to useful stuff by default, and also that we enable hot key handling by default on driver load (like Windows does). The documentation for proper use of this resource is also updated. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Richard Hughes <hughsient@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/thinkpad-acpi.txt89
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
155procfs: /proc/acpi/ibm/hotkey 155procfs: /proc/acpi/ibm/hotkey
156sysfs device attribute: hotkey_* 156sysfs device attribute: hotkey_*
157 157
158Without this driver, only the Fn-F4 key (sleep button) generates an 158In a ThinkPad, the ACPI HKEY handler is responsible for comunicating
159ACPI event. With the driver loaded, the hotkey feature enabled and the 159some important events and also keyboard hot key presses to the operating
160mask set (see below), the various hot keys generate ACPI events in the 160system. Enabling the hotkey functionality of thinkpad-acpi signals the
161firmware that such a driver is present, and modifies how the ThinkPad
162firmware will behave in many situations.
163
164When the hotkey feature is enabled and the hot key mask is set (see
165below), the various hot keys either generate ACPI events in the
161following format: 166following format:
162 167
163 ibm/hotkey HKEY 00000080 0000xxxx 168 ibm/hotkey HKEY 00000080 0000xxxx
164 169
165The last four digits vary depending on the key combination pressed. 170or events over the input layer. The input layer support accepts the
166All labeled Fn-Fx key combinations generate distinct events. In 171standard IOCTLs to remap the keycodes assigned to each hotkey.
167addition, the lid microswitch and some docking station buttons may
168also generate such events.
169
170Hot keys also generate regular keyboard key press/release events through
171the input layer in addition to the ibm/hotkey ACPI events. The input
172layer support accepts the standard IOCTLs to remap the keycodes assigned
173to each hotkey.
174 172
175When the input device is open, the driver will suppress any ACPI hot key 173When the input device is open, the driver will suppress any ACPI hot key
176events that get translated into a meaningful input layer event, in order 174events that get translated into a meaningful input layer event, in order
177to avoid sending duplicate events to userspace. Hot keys that are 175to avoid sending duplicate events to userspace. Hot keys that are
178mapped to KEY_RESERVED are not translated, and will always generate only 176mapped to KEY_RESERVED in the keymap are not translated, and will always
179ACPI hot key event, and no input layer events. 177generate an ACPI ibm/hotkey HKEY event, and no input layer events.
180 178
181The bit mask allows some control over which hot keys generate ACPI 179The hot key bit mask allows some control over which hot keys generate
182events. Not all bits in the mask can be modified. Not all bits that can 180events. If a key is "masked" (bit set to 0 in the mask), the firmware
183be modified do anything. Not all hot keys can be individually controlled 181will handle it. If it is "unmasked", it signals the firmware that
184by the mask. Some models do not support the mask at all. On those 182thinkpad-acpi would prefer to handle it, if the firmware would be so
185models, hot keys cannot be controlled individually. 183kind to allow it (and it often doesn't!).
186 184
187Note that enabling ACPI events for some keys prevents their default 185Not all bits in the mask can be modified. Not all bits that can be
188behavior. For example, if events for Fn-F5 are enabled, that key will no 186modified do anything. Not all hot keys can be individually controlled
189longer enable/disable Bluetooth by itself. This can still be done from 187by the mask. Some models do not support the mask at all, and in those
190an acpid handler for the ibm/hotkey event. 188models, hot keys cannot be controlled individually. The behaviour of
191 189the mask is, therefore, higly dependent on the ThinkPad model.
192On some models, even enabling/disabling the entire hot key feature may 190
193change the way some keys behave (e.g. in a T43, Fn+F4 will generate an 191Note that unmasking some keys prevents their default behavior. For
194button/sleep ACPI event if hot keys are disabled, and it will ignore its 192example, if Fn+F5 is unmasked, that key will no longer enable/disable
195mask when hot keys are enabled, so the key always does something. On a 193Bluetooth by itself.
196X40, Fn+F4 respects its mask status, but generates the button/sleep ACPI 194
197event if masked off). 195Note also that not all Fn key combinations are supported through ACPI.
198 196For example, on the X40, the brightness, volume and "Access IBM" buttons
199Note also that not all Fn key combinations are supported through 197do not generate ACPI events even with this driver. They *can* be used
200ACPI. For example, on the X40, the brightness, volume and "Access IBM" 198through the "ThinkPad Buttons" utility, see http://www.nongnu.org/tpb/
201buttons do not generate ACPI events even with this driver. They *can*
202be used through the "ThinkPad Buttons" utility, see
203http://www.nongnu.org/tpb/
204 199
205procfs notes: 200procfs 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.
390If a key is mapped to anything else, it will only generate legacy 387If a key is mapped to anything else, it will only generate legacy
391thinkpad-acpi ACPI hotkey events if nobody has opened the input device. 388thinkpad-acpi ACPI hotkey events if nobody has opened the input device.
392 389
393For userspace backwards-compatibility purposes, the keycode map is
394initially filled with KEY_RESERVED and KEY_UNKNOWN mappings for scan codes
3950x00 to 0x10 (and maybe others).
396
397Non hot-key ACPI HKEY event map: 390Non hot-key ACPI HKEY event map:
3980x5001 Lid closed 3910x5001 Lid closed
3990x5002 Lid opened 3920x5002 Lid opened