ACPI: ibm-acpi: move driver to drivers/misc hierarchy
[pandora-kernel.git] / Documentation / thinkpad-acpi.txt
1                     IBM ThinkPad ACPI Extras Driver
2
3                             Version 0.13
4                            31 December 2006
5
6                Borislav Deianov <borislav@users.sf.net>
7              Henrique de Moraes Holschuh <hmh@hmh.eng.br>
8                       http://ibm-acpi.sf.net/
9
10
11 This is a Linux ACPI driver for the IBM ThinkPad laptops. It supports
12 various features of these laptops which are accessible through the
13 ACPI framework but not otherwise fully supported by the generic Linux
14 ACPI drivers.
15
16
17 Status
18 ------
19
20 The features currently supported are the following (see below for
21 detailed description):
22
23         - Fn key combinations
24         - Bluetooth enable and disable
25         - video output switching, expansion control
26         - ThinkLight on and off
27         - limited docking and undocking
28         - UltraBay eject
29         - CMOS control
30         - LED control
31         - ACPI sounds
32         - temperature sensors
33         - Experimental: embedded controller register dump
34         - LCD brightness control
35         - Volume control
36         - Experimental: fan speed, fan enable/disable
37         - Experimental: WAN enable and disable
38
39 A compatibility table by model and feature is maintained on the web
40 site, http://ibm-acpi.sf.net/. I appreciate any success or failure
41 reports, especially if they add to or correct the compatibility table.
42 Please include the following information in your report:
43
44         - ThinkPad model name
45         - a copy of your DSDT, from /proc/acpi/dsdt
46         - which driver features work and which don't
47         - the observed behavior of non-working features
48
49 Any other comments or patches are also more than welcome.
50
51
52 Installation
53 ------------
54
55 If you are compiling this driver as included in the Linux kernel
56 sources, simply enable the CONFIG_ACPI_IBM option (Power Management /
57 ACPI / IBM ThinkPad Laptop Extras).
58
59 Features
60 --------
61
62 The driver creates the /proc/acpi/ibm directory. There is a file under
63 that directory for each feature described below. Note that while the
64 driver is still in the alpha stage, the exact proc file format and
65 commands supported by the various features is guaranteed to change
66 frequently.
67
68 Driver version -- /proc/acpi/ibm/driver
69 ---------------------------------------
70
71 The driver name and version. No commands can be written to this file.
72
73 Hot keys -- /proc/acpi/ibm/hotkey
74 ---------------------------------
75
76 Without this driver, only the Fn-F4 key (sleep button) generates an
77 ACPI event. With the driver loaded, the hotkey feature enabled and the
78 mask set (see below), the various hot keys generate ACPI events in the
79 following format:
80
81         ibm/hotkey HKEY 00000080 0000xxxx
82
83 The last four digits vary depending on the key combination pressed.
84 All labeled Fn-Fx key combinations generate distinct events. In
85 addition, the lid microswitch and some docking station buttons may
86 also generate such events.
87
88 The following commands can be written to this file:
89
90         echo enable > /proc/acpi/ibm/hotkey -- enable the hot keys feature
91         echo disable > /proc/acpi/ibm/hotkey -- disable the hot keys feature
92         echo 0xffff > /proc/acpi/ibm/hotkey -- enable all possible hot keys
93         echo 0x0000 > /proc/acpi/ibm/hotkey -- disable all possible hot keys
94         ... any other 4-hex-digit mask ...
95         echo reset > /proc/acpi/ibm/hotkey -- restore the original mask
96
97 The bit mask allows some control over which hot keys generate ACPI
98 events. Not all bits in the mask can be modified. Not all bits that
99 can be modified do anything. Not all hot keys can be individually
100 controlled by the mask. Most recent ThinkPad models honor the
101 following bits (assuming the hot keys feature has been enabled):
102
103         key     bit     behavior when set       behavior when unset
104
105         Fn-F3                   always generates ACPI event
106         Fn-F4                   always generates ACPI event
107         Fn-F5   0010    generate ACPI event     enable/disable Bluetooth
108         Fn-F7   0040    generate ACPI event     switch LCD and external display
109         Fn-F8   0080    generate ACPI event     expand screen or none
110         Fn-F9   0100    generate ACPI event     none
111         Fn-F12                  always generates ACPI event
112
113 Some models do not support all of the above. For example, the T30 does
114 not support Fn-F5 and Fn-F9. Other models do not support the mask at
115 all. On those models, hot keys cannot be controlled individually.
116
117 Note that enabling ACPI events for some keys prevents their default
118 behavior. For example, if events for Fn-F5 are enabled, that key will
119 no longer enable/disable Bluetooth by itself. This can still be done
120 from an acpid handler for the ibm/hotkey event.
121
122 Note also that not all Fn key combinations are supported through
123 ACPI. For example, on the X40, the brightness, volume and "Access IBM"
124 buttons do not generate ACPI events even with this driver. They *can*
125 be used through the "ThinkPad Buttons" utility, see
126 http://www.nongnu.org/tpb/
127
128 Bluetooth -- /proc/acpi/ibm/bluetooth
129 -------------------------------------
130
131 This feature shows the presence and current state of a Bluetooth
132 device. If Bluetooth is installed, the following commands can be used:
133
134         echo enable > /proc/acpi/ibm/bluetooth
135         echo disable > /proc/acpi/ibm/bluetooth
136
137 Video output control -- /proc/acpi/ibm/video
138 --------------------------------------------
139
140 This feature allows control over the devices used for video output -
141 LCD, CRT or DVI (if available). The following commands are available:
142
143         echo lcd_enable > /proc/acpi/ibm/video
144         echo lcd_disable > /proc/acpi/ibm/video
145         echo crt_enable > /proc/acpi/ibm/video
146         echo crt_disable > /proc/acpi/ibm/video
147         echo dvi_enable > /proc/acpi/ibm/video
148         echo dvi_disable > /proc/acpi/ibm/video
149         echo auto_enable > /proc/acpi/ibm/video
150         echo auto_disable > /proc/acpi/ibm/video
151         echo expand_toggle > /proc/acpi/ibm/video
152         echo video_switch > /proc/acpi/ibm/video
153
154 Each video output device can be enabled or disabled individually.
155 Reading /proc/acpi/ibm/video shows the status of each device.
156
157 Automatic video switching can be enabled or disabled.  When automatic
158 video switching is enabled, certain events (e.g. opening the lid,
159 docking or undocking) cause the video output device to change
160 automatically. While this can be useful, it also causes flickering
161 and, on the X40, video corruption. By disabling automatic switching,
162 the flickering or video corruption can be avoided.
163
164 The video_switch command cycles through the available video outputs
165 (it simulates the behavior of Fn-F7).
166
167 Video expansion can be toggled through this feature. This controls
168 whether the display is expanded to fill the entire LCD screen when a
169 mode with less than full resolution is used. Note that the current
170 video expansion status cannot be determined through this feature.
171
172 Note that on many models (particularly those using Radeon graphics
173 chips) the X driver configures the video card in a way which prevents
174 Fn-F7 from working. This also disables the video output switching
175 features of this driver, as it uses the same ACPI methods as
176 Fn-F7. Video switching on the console should still work.
177
178 UPDATE: There's now a patch for the X.org Radeon driver which
179 addresses this issue. Some people are reporting success with the patch
180 while others are still having problems. For more information:
181
182 https://bugs.freedesktop.org/show_bug.cgi?id=2000
183
184 ThinkLight control -- /proc/acpi/ibm/light
185 ------------------------------------------
186
187 The current status of the ThinkLight can be found in this file. A few
188 models which do not make the status available will show it as
189 "unknown". The available commands are:
190
191         echo on  > /proc/acpi/ibm/light
192         echo off > /proc/acpi/ibm/light
193
194 Docking / undocking -- /proc/acpi/ibm/dock
195 ------------------------------------------
196
197 Docking and undocking (e.g. with the X4 UltraBase) requires some
198 actions to be taken by the operating system to safely make or break
199 the electrical connections with the dock.
200
201 The docking feature of this driver generates the following ACPI events:
202
203         ibm/dock GDCK 00000003 00000001 -- eject request
204         ibm/dock GDCK 00000003 00000002 -- undocked
205         ibm/dock GDCK 00000000 00000003 -- docked
206
207 NOTE: These events will only be generated if the laptop was docked
208 when originally booted. This is due to the current lack of support for
209 hot plugging of devices in the Linux ACPI framework. If the laptop was
210 booted while not in the dock, the following message is shown in the
211 logs:
212
213         Mar 17 01:42:34 aero kernel: ibm_acpi: dock device not present
214
215 In this case, no dock-related events are generated but the dock and
216 undock commands described below still work. They can be executed
217 manually or triggered by Fn key combinations (see the example acpid
218 configuration files included in the driver tarball package available
219 on the web site).
220
221 When the eject request button on the dock is pressed, the first event
222 above is generated. The handler for this event should issue the
223 following command:
224
225         echo undock > /proc/acpi/ibm/dock
226
227 After the LED on the dock goes off, it is safe to eject the laptop.
228 Note: if you pressed this key by mistake, go ahead and eject the
229 laptop, then dock it back in. Otherwise, the dock may not function as
230 expected.
231
232 When the laptop is docked, the third event above is generated. The
233 handler for this event should issue the following command to fully
234 enable the dock:
235
236         echo dock > /proc/acpi/ibm/dock
237
238 The contents of the /proc/acpi/ibm/dock file shows the current status
239 of the dock, as provided by the ACPI framework.
240
241 The docking support in this driver does not take care of enabling or
242 disabling any other devices you may have attached to the dock. For
243 example, a CD drive plugged into the UltraBase needs to be disabled or
244 enabled separately. See the provided example acpid configuration files
245 for how this can be accomplished.
246
247 There is no support yet for PCI devices that may be attached to a
248 docking station, e.g. in the ThinkPad Dock II. The driver currently
249 does not recognize, enable or disable such devices. This means that
250 the only docking stations currently supported are the X-series
251 UltraBase docks and "dumb" port replicators like the Mini Dock (the
252 latter don't need any ACPI support, actually).
253
254 UltraBay eject -- /proc/acpi/ibm/bay
255 ------------------------------------
256
257 Inserting or ejecting an UltraBay device requires some actions to be
258 taken by the operating system to safely make or break the electrical
259 connections with the device.
260
261 This feature generates the following ACPI events:
262
263         ibm/bay MSTR 00000003 00000000 -- eject request
264         ibm/bay MSTR 00000001 00000000 -- eject lever inserted
265
266 NOTE: These events will only be generated if the UltraBay was present
267 when the laptop was originally booted (on the X series, the UltraBay
268 is in the dock, so it may not be present if the laptop was undocked).
269 This is due to the current lack of support for hot plugging of devices
270 in the Linux ACPI framework. If the laptop was booted without the
271 UltraBay, the following message is shown in the logs:
272
273         Mar 17 01:42:34 aero kernel: ibm_acpi: bay device not present
274
275 In this case, no bay-related events are generated but the eject
276 command described below still works. It can be executed manually or
277 triggered by a hot key combination.
278
279 Sliding the eject lever generates the first event shown above. The
280 handler for this event should take whatever actions are necessary to
281 shut down the device in the UltraBay (e.g. call idectl), then issue
282 the following command:
283
284         echo eject > /proc/acpi/ibm/bay
285
286 After the LED on the UltraBay goes off, it is safe to pull out the
287 device.
288
289 When the eject lever is inserted, the second event above is
290 generated. The handler for this event should take whatever actions are
291 necessary to enable the UltraBay device (e.g. call idectl).
292
293 The contents of the /proc/acpi/ibm/bay file shows the current status
294 of the UltraBay, as provided by the ACPI framework.
295
296 EXPERIMENTAL warm eject support on the 600e/x, A22p and A3x (To use
297 this feature, you need to supply the experimental=1 parameter when
298 loading the module):
299
300 These models do not have a button near the UltraBay device to request
301 a hot eject but rather require the laptop to be put to sleep
302 (suspend-to-ram) before the bay device is ejected or inserted).
303 The sequence of steps to eject the device is as follows:
304
305         echo eject > /proc/acpi/ibm/bay
306         put the ThinkPad to sleep
307         remove the drive
308         resume from sleep
309         cat /proc/acpi/ibm/bay should show that the drive was removed
310
311 On the A3x, both the UltraBay 2000 and UltraBay Plus devices are
312 supported. Use "eject2" instead of "eject" for the second bay.
313
314 Note: the UltraBay eject support on the 600e/x, A22p and A3x is
315 EXPERIMENTAL and may not work as expected. USE WITH CAUTION!
316
317 CMOS control -- /proc/acpi/ibm/cmos
318 -----------------------------------
319
320 This feature is used internally by the ACPI firmware to control the
321 ThinkLight on most newer ThinkPad models. It may also control LCD
322 brightness, sounds volume and more, but only on some models.
323
324 The commands are non-negative integer numbers:
325
326         echo 0 >/proc/acpi/ibm/cmos
327         echo 1 >/proc/acpi/ibm/cmos
328         echo 2 >/proc/acpi/ibm/cmos
329         ...
330
331 The range of valid numbers is 0 to 21, but not all have an effect and
332 the behavior varies from model to model. Here is the behavior on the
333 X40 (tpb is the ThinkPad Buttons utility):
334
335         0 - no effect but tpb reports "Volume down"
336         1 - no effect but tpb reports "Volume up"
337         2 - no effect but tpb reports "Mute on"
338         3 - simulate pressing the "Access IBM" button
339         4 - LCD brightness up
340         5 - LCD brightness down
341         11 - toggle screen expansion
342         12 - ThinkLight on
343         13 - ThinkLight off
344         14 - no effect but tpb reports ThinkLight status change
345
346 LED control -- /proc/acpi/ibm/led
347 ---------------------------------
348
349 Some of the LED indicators can be controlled through this feature. The
350 available commands are:
351
352         echo '<led number> on' >/proc/acpi/ibm/led
353         echo '<led number> off' >/proc/acpi/ibm/led
354         echo '<led number> blink' >/proc/acpi/ibm/led
355
356 The <led number> range is 0 to 7. The set of LEDs that can be
357 controlled varies from model to model. Here is the mapping on the X40:
358
359         0 - power
360         1 - battery (orange)
361         2 - battery (green)
362         3 - UltraBase
363         4 - UltraBay
364         7 - standby
365
366 All of the above can be turned on and off and can be made to blink.
367
368 ACPI sounds -- /proc/acpi/ibm/beep
369 ----------------------------------
370
371 The BEEP method is used internally by the ACPI firmware to provide
372 audible alerts in various situations. This feature allows the same
373 sounds to be triggered manually.
374
375 The commands are non-negative integer numbers:
376
377         echo <number> >/proc/acpi/ibm/beep
378
379 The valid <number> range is 0 to 17. Not all numbers trigger sounds
380 and the sounds vary from model to model. Here is the behavior on the
381 X40:
382
383         0 - stop a sound in progress (but use 17 to stop 16)
384         2 - two beeps, pause, third beep ("low battery")
385         3 - single beep
386         4 - high, followed by low-pitched beep ("unable")
387         5 - single beep
388         6 - very high, followed by high-pitched beep ("AC/DC")
389         7 - high-pitched beep
390         9 - three short beeps
391         10 - very long beep
392         12 - low-pitched beep
393         15 - three high-pitched beeps repeating constantly, stop with 0
394         16 - one medium-pitched beep repeating constantly, stop with 17
395         17 - stop 16
396
397 Temperature sensors -- /proc/acpi/ibm/thermal
398 ---------------------------------------------
399
400 Most ThinkPads include six or more separate temperature sensors but
401 only expose the CPU temperature through the standard ACPI methods.
402 This feature shows readings from up to eight different sensors on older
403 ThinkPads, and it has experimental support for up to sixteen different
404 sensors on newer ThinkPads.  Readings from sensors that are not available
405 return -128.
406
407 No commands can be written to this file.
408
409 EXPERIMENTAL: The 16-sensors feature is marked EXPERIMENTAL because the
410 implementation directly accesses hardware registers and may not work as
411 expected. USE WITH CAUTION! To use this feature, you need to supply the
412 experimental=1 parameter when loading the module.  When EXPERIMENTAL
413 mode is enabled, reading the first 8 sensors on newer ThinkPads will
414 also use an new experimental thermal sensor access mode.
415
416 For example, on the X40, a typical output may be:
417 temperatures:   42 42 45 41 36 -128 33 -128
418
419 EXPERIMENTAL: On the T43/p, a typical output may be:
420 temperatures:   48 48 36 52 38 -128 31 -128 48 52 48 -128 -128 -128 -128 -128
421
422 The mapping of thermal sensors to physical locations varies depending on
423 system-board model (and thus, on ThinkPad model).
424
425 http://thinkwiki.org/wiki/Thermal_Sensors is a public wiki page that
426 tries to track down these locations for various models.
427
428 Most (newer?) models seem to follow this pattern:
429
430 1:  CPU
431 2:  (depends on model)
432 3:  (depends on model)
433 4:  GPU
434 5:  Main battery: main sensor
435 6:  Bay battery: main sensor
436 7:  Main battery: secondary sensor
437 8:  Bay battery: secondary sensor
438 9-15: (depends on model)
439
440 For the R51 (source: Thomas Gruber):
441 2:  Mini-PCI
442 3:  Internal HDD
443
444 For the T43, T43/p (source: Shmidoax/Thinkwiki.org)
445 http://thinkwiki.org/wiki/Thermal_Sensors#ThinkPad_T43.2C_T43p
446 2:  System board, left side (near PCMCIA slot), reported as HDAPS temp
447 3:  PCMCIA slot
448 9:  MCH (northbridge) to DRAM Bus
449 10: ICH (southbridge), under Mini-PCI card, under touchpad
450 11: Power regulator, underside of system board, below F2 key
451
452 The A31 has a very atypical layout for the thermal sensors
453 (source: Milos Popovic, http://thinkwiki.org/wiki/Thermal_Sensors#ThinkPad_A31)
454 1:  CPU
455 2:  Main Battery: main sensor
456 3:  Power Converter
457 4:  Bay Battery: main sensor
458 5:  MCH (northbridge)
459 6:  PCMCIA/ambient
460 7:  Main Battery: secondary sensor
461 8:  Bay Battery: secondary sensor
462
463
464 EXPERIMENTAL: Embedded controller register dump -- /proc/acpi/ibm/ecdump
465 ------------------------------------------------------------------------
466
467 This feature is marked EXPERIMENTAL because the implementation
468 directly accesses hardware registers and may not work as expected. USE
469 WITH CAUTION! To use this feature, you need to supply the
470 experimental=1 parameter when loading the module.
471
472 This feature dumps the values of 256 embedded controller
473 registers. Values which have changed since the last time the registers
474 were dumped are marked with a star:
475
476 [root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump
477 EC       +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f
478 EC 0x00:  a7  47  87  01  fe  96  00  08  01  00  cb  00  00  00  40  00
479 EC 0x10:  00  00  ff  ff  f4  3c  87  09  01  ff  42  01  ff  ff  0d  00
480 EC 0x20:  00  00  00  00  00  00  00  00  00  00  00  03  43  00  00  80
481 EC 0x30:  01  07  1a  00  30  04  00  00 *85  00  00  10  00  50  00  00
482 EC 0x40:  00  00  00  00  00  00  14  01  00  04  00  00  00  00  00  00
483 EC 0x50:  00  c0  02  0d  00  01  01  02  02  03  03  03  03 *bc *02 *bc
484 EC 0x60: *02 *bc *02  00  00  00  00  00  00  00  00  00  00  00  00  00
485 EC 0x70:  00  00  00  00  00  12  30  40 *24 *26 *2c *27 *20  80 *1f  80
486 EC 0x80:  00  00  00  06 *37 *0e  03  00  00  00  0e  07  00  00  00  00
487 EC 0x90:  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
488 EC 0xa0: *ff  09  ff  09  ff  ff *64  00 *00 *00 *a2  41 *ff *ff *e0  00
489 EC 0xb0:  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
490 EC 0xc0:  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
491 EC 0xd0:  03  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
492 EC 0xe0:  00  00  00  00  00  00  00  00  11  20  49  04  24  06  55  03
493 EC 0xf0:  31  55  48  54  35  38  57  57  08  2f  45  73  07  65  6c  1a
494
495 This feature can be used to determine the register holding the fan
496 speed on some models. To do that, do the following:
497
498         - make sure the battery is fully charged
499         - make sure the fan is running
500         - run 'cat /proc/acpi/ibm/ecdump' several times, once per second or so
501
502 The first step makes sure various charging-related values don't
503 vary. The second ensures that the fan-related values do vary, since
504 the fan speed fluctuates a bit. The third will (hopefully) mark the
505 fan register with a star:
506
507 [root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump
508 EC       +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f
509 EC 0x00:  a7  47  87  01  fe  96  00  08  01  00  cb  00  00  00  40  00
510 EC 0x10:  00  00  ff  ff  f4  3c  87  09  01  ff  42  01  ff  ff  0d  00
511 EC 0x20:  00  00  00  00  00  00  00  00  00  00  00  03  43  00  00  80
512 EC 0x30:  01  07  1a  00  30  04  00  00  85  00  00  10  00  50  00  00
513 EC 0x40:  00  00  00  00  00  00  14  01  00  04  00  00  00  00  00  00
514 EC 0x50:  00  c0  02  0d  00  01  01  02  02  03  03  03  03  bc  02  bc
515 EC 0x60:  02  bc  02  00  00  00  00  00  00  00  00  00  00  00  00  00
516 EC 0x70:  00  00  00  00  00  12  30  40  24  27  2c  27  21  80  1f  80
517 EC 0x80:  00  00  00  06 *be  0d  03  00  00  00  0e  07  00  00  00  00
518 EC 0x90:  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
519 EC 0xa0:  ff  09  ff  09  ff  ff  64  00  00  00  a2  41  ff  ff  e0  00
520 EC 0xb0:  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
521 EC 0xc0:  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
522 EC 0xd0:  03  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
523 EC 0xe0:  00  00  00  00  00  00  00  00  11  20  49  04  24  06  55  03
524 EC 0xf0:  31  55  48  54  35  38  57  57  08  2f  45  73  07  65  6c  1a
525
526 Another set of values that varies often is the temperature
527 readings. Since temperatures don't change vary fast, you can take
528 several quick dumps to eliminate them.
529
530 You can use a similar method to figure out the meaning of other
531 embedded controller registers - e.g. make sure nothing else changes
532 except the charging or discharging battery to determine which
533 registers contain the current battery capacity, etc. If you experiment
534 with this, do send me your results (including some complete dumps with
535 a description of the conditions when they were taken.)
536
537 LCD brightness control -- /proc/acpi/ibm/brightness
538 ---------------------------------------------------
539
540 This feature allows software control of the LCD brightness on ThinkPad
541 models which don't have a hardware brightness slider. The available
542 commands are:
543
544         echo up   >/proc/acpi/ibm/brightness
545         echo down >/proc/acpi/ibm/brightness
546         echo 'level <level>' >/proc/acpi/ibm/brightness
547
548 The <level> number range is 0 to 7, although not all of them may be
549 distinct. The current brightness level is shown in the file.
550
551 Volume control -- /proc/acpi/ibm/volume
552 ---------------------------------------
553
554 This feature allows volume control on ThinkPad models which don't have
555 a hardware volume knob. The available commands are:
556
557         echo up   >/proc/acpi/ibm/volume
558         echo down >/proc/acpi/ibm/volume
559         echo mute >/proc/acpi/ibm/volume
560         echo 'level <level>' >/proc/acpi/ibm/volume
561
562 The <level> number range is 0 to 15 although not all of them may be
563 distinct. The unmute the volume after the mute command, use either the
564 up or down command (the level command will not unmute the volume).
565 The current volume level and mute state is shown in the file.
566
567 EXPERIMENTAL: fan speed, fan enable/disable -- /proc/acpi/ibm/fan
568 -----------------------------------------------------------------
569
570 This feature is marked EXPERIMENTAL because the implementation
571 directly accesses hardware registers and may not work as expected. USE
572 WITH CAUTION! To use this feature, you need to supply the
573 experimental=1 parameter when loading the module.
574
575 This feature attempts to show the current fan speed, control mode and
576 other fan data that might be available.  The speed is read directly
577 from the hardware registers of the embedded controller.  This is known
578 to work on later R, T and X series ThinkPads but may show a bogus
579 value on other models.
580
581 Most ThinkPad fans work in "levels".  Level 0 stops the fan.  The higher
582 the level, the higher the fan speed, although adjacent levels often map
583 to the same fan speed.  7 is the highest level, where the fan reaches
584 the maximum recommended speed.  Level "auto" means the EC changes the
585 fan level according to some internal algorithm, usually based on
586 readings from the thermal sensors.  Level "disengaged" means the EC
587 disables the speed-locked closed-loop fan control, and drives the fan as
588 fast as it can go, which might exceed hardware limits, so use this level
589 with caution.
590
591 The fan usually ramps up or down slowly from one speed to another,
592 and it is normal for the EC to take several seconds to react to fan
593 commands.
594
595 The fan may be enabled or disabled with the following commands:
596
597         echo enable  >/proc/acpi/ibm/fan
598         echo disable >/proc/acpi/ibm/fan
599
600 Placing a fan on level 0 is the same as disabling it.  Enabling a fan
601 will try to place it in a safe level if it is too slow or disabled.
602
603 WARNING WARNING WARNING: do not leave the fan disabled unless you are
604 monitoring all of the temperature sensor readings and you are ready to
605 enable it if necessary to avoid overheating.
606
607 An enabled fan in level "auto" may stop spinning if the EC decides the
608 ThinkPad is cool enough and doesn't need the extra airflow.  This is
609 normal, and the EC will spin the fan up if the varios thermal readings
610 rise too much.
611
612 On the X40, this seems to depend on the CPU and HDD temperatures.
613 Specifically, the fan is turned on when either the CPU temperature
614 climbs to 56 degrees or the HDD temperature climbs to 46 degrees.  The
615 fan is turned off when the CPU temperature drops to 49 degrees and the
616 HDD temperature drops to 41 degrees.  These thresholds cannot
617 currently be controlled.
618
619 The fan level can be controlled with the command:
620
621         echo 'level <level>' > /proc/acpi/ibm/thermal
622
623 Where <level> is an integer from 0 to 7, or one of the words "auto"
624 or "disengaged" (without the quotes).  Not all ThinkPads support the
625 "auto" and "disengaged" levels.
626
627 On the X31 and X40 (and ONLY on those models), the fan speed can be
628 controlled to a certain degree. Once the fan is running, it can be
629 forced to run faster or slower with the following command:
630
631         echo 'speed <speed>' > /proc/acpi/ibm/thermal
632
633 The sustainable range of fan speeds on the X40 appears to be from
634 about 3700 to about 7350. Values outside this range either do not have
635 any effect or the fan speed eventually settles somewhere in that
636 range. The fan cannot be stopped or started with this command.
637
638 The ThinkPad's ACPI DSDT code will reprogram the fan on its own when
639 certain conditions are met.  It will override any fan programming done
640 through ibm-acpi.
641
642 The ibm-acpi kernel driver can be programmed to revert the fan level
643 to a safe setting if userspace does not issue one of the fan commands:
644 "enable", "disable", "level" or "watchdog" within a configurable
645 ammount of time.  To do this, use the "watchdog" command.
646
647         echo 'watchdog <interval>' > /proc/acpi/ibm/fan
648
649 Interval is the ammount of time in seconds to wait for one of the
650 above mentioned fan commands before reseting the fan level to a safe
651 one.  If set to zero, the watchdog is disabled (default).  When the
652 watchdog timer runs out, it does the exact equivalent of the "enable"
653 fan command.
654
655 Note that the watchdog timer stops after it enables the fan.  It will
656 be rearmed again automatically (using the same interval) when one of
657 the above mentioned fan commands is received.  The fan watchdog is,
658 therefore, not suitable to protect against fan mode changes made
659 through means other than the "enable", "disable", and "level" fan
660 commands.
661
662 EXPERIMENTAL: WAN -- /proc/acpi/ibm/wan
663 ---------------------------------------
664
665 This feature is marked EXPERIMENTAL because the implementation
666 directly accesses hardware registers and may not work as expected. USE
667 WITH CAUTION! To use this feature, you need to supply the
668 experimental=1 parameter when loading the module.
669
670 This feature shows the presence and current state of a WAN (Sierra
671 Wireless EV-DO) device. If WAN is installed, the following commands can
672 be used:
673
674         echo enable > /proc/acpi/ibm/wan
675         echo disable > /proc/acpi/ibm/wan
676
677 It was tested on a Lenovo Thinkpad X60. It should probably work on other
678 Thinkpad models which come with this module installed.
679
680 Multiple Commands, Module Parameters
681 ------------------------------------
682
683 Multiple commands can be written to the proc files in one shot by
684 separating them with commas, for example:
685
686         echo enable,0xffff > /proc/acpi/ibm/hotkey
687         echo lcd_disable,crt_enable > /proc/acpi/ibm/video
688
689 Commands can also be specified when loading the ibm_acpi module, for
690 example:
691
692         modprobe ibm_acpi hotkey=enable,0xffff video=auto_disable
693