aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/sony-laptop.txt25
-rw-r--r--Documentation/thinkpad-acpi.txt (renamed from Documentation/ibm-acpi.txt)585
-rw-r--r--Documentation/video4linux/meye.txt7
3 files changed, 440 insertions, 177 deletions
diff --git a/Documentation/sony-laptop.txt b/Documentation/sony-laptop.txt
index dfd26df056f4..7a5c1a81905c 100644
--- a/Documentation/sony-laptop.txt
+++ b/Documentation/sony-laptop.txt
@@ -3,12 +3,18 @@ Sony Notebook Control Driver (SNC) Readme
3 Copyright (C) 2004- 2005 Stelian Pop <stelian@popies.net> 3 Copyright (C) 2004- 2005 Stelian Pop <stelian@popies.net>
4 Copyright (C) 2007 Mattia Dongili <malattia@linux.it> 4 Copyright (C) 2007 Mattia Dongili <malattia@linux.it>
5 5
6This mini-driver drives the SNC device present in the ACPI BIOS of 6This mini-driver drives the SNC and SPIC device present in the ACPI BIOS of the
7the Sony Vaio laptops. 7Sony Vaio laptops. This driver mixes both devices functions under the same
8(hopefully consistent) interface. This also means that the sonypi driver is
9obsoleted by sony-laptop now.
8 10
9It gives access to some extra laptop functionalities. In its current 11Fn keys (hotkeys):
10form, this driver let the user set or query the screen brightness 12------------------
11through the backlight subsystem and remove/apply power to some devices. 13Some models report hotkeys through the SNC or SPIC devices, such events are
14reported both through the ACPI subsystem as acpi events and through the INPUT
15subsystem. See the logs of acpid or /proc/acpi/event and
16/proc/bus/input/devices to find out what those events are and which input
17devices are created by the driver.
12 18
13Backlight control: 19Backlight control:
14------------------ 20------------------
@@ -39,6 +45,8 @@ The files are:
39 audiopower power on/off the internal sound card 45 audiopower power on/off the internal sound card
40 lanpower power on/off the internal ethernet card 46 lanpower power on/off the internal ethernet card
41 (only in debug mode) 47 (only in debug mode)
48 bluetoothpower power on/off the internal bluetooth device
49 fanspeed get/set the fan speed
42 50
43Note that some files may be missing if they are not supported 51Note that some files may be missing if they are not supported
44by your particular laptop model. 52by your particular laptop model.
@@ -76,9 +84,9 @@ The sony-laptop driver creates, for some of those methods (the most
76current ones found on several Vaio models), an entry under 84current ones found on several Vaio models), an entry under
77/sys/devices/platform/sony-laptop, just like the 'cdpower' one. 85/sys/devices/platform/sony-laptop, just like the 'cdpower' one.
78You can create other entries corresponding to your own laptop methods by 86You can create other entries corresponding to your own laptop methods by
79further editing the source (see the 'sony_acpi_values' table, and add a new 87further editing the source (see the 'sony_nc_values' table, and add a new
80entry to this table with your get/set method names using the 88entry to this table with your get/set method names using the
81HANDLE_NAMES macro). 89SNC_HANDLE_NAMES macro).
82 90
83Your mission, should you accept it, is to try finding out what 91Your mission, should you accept it, is to try finding out what
84those entries are for, by reading/writing random values from/to those 92those entries are for, by reading/writing random values from/to those
@@ -87,6 +95,9 @@ files and find out what is the impact on your laptop.
87Should you find anything interesting, please report it back to me, 95Should you find anything interesting, please report it back to me,
88I will not disavow all knowledge of your actions :) 96I will not disavow all knowledge of your actions :)
89 97
98See also http://www.linux.it/~malattia/wiki/index.php/Sony_drivers for other
99useful info.
100
90Bugs/Limitations: 101Bugs/Limitations:
91----------------- 102-----------------
92 103
diff --git a/Documentation/ibm-acpi.txt b/Documentation/thinkpad-acpi.txt
index 0132d363feb5..2d4803359a04 100644
--- a/Documentation/ibm-acpi.txt
+++ b/Documentation/thinkpad-acpi.txt
@@ -1,16 +1,22 @@
1 IBM ThinkPad ACPI Extras Driver 1 ThinkPad ACPI Extras Driver
2 2
3 Version 0.12 3 Version 0.14
4 17 August 2005 4 April 21st, 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 http://ibm-acpi.sf.net/ 8 http://ibm-acpi.sf.net/
8 9
9 10
10This is a Linux ACPI driver for the IBM ThinkPad laptops. It supports 11This is a Linux driver for the IBM and Lenovo ThinkPad laptops. It
11various features of these laptops which are accessible through the 12supports various features of these laptops which are accessible
12ACPI framework but not otherwise supported by the generic Linux ACPI 13through the ACPI and ACPI EC framework, but not otherwise fully
13drivers. 14supported by the generic Linux ACPI drivers.
15
16This driver used to be named ibm-acpi until kernel 2.6.21 and release
170.13-20070314. It used to be in the drivers/acpi tree, but it was
18moved to the drivers/misc tree and renamed to thinkpad-acpi for kernel
192.6.22, and release 0.14.
14 20
15 21
16Status 22Status
@@ -21,7 +27,7 @@ detailed description):
21 27
22 - Fn key combinations 28 - Fn key combinations
23 - Bluetooth enable and disable 29 - Bluetooth enable and disable
24 - video output switching, expansion control 30 - video output switching, expansion control
25 - ThinkLight on and off 31 - ThinkLight on and off
26 - limited docking and undocking 32 - limited docking and undocking
27 - UltraBay eject 33 - UltraBay eject
@@ -32,7 +38,7 @@ detailed description):
32 - Experimental: embedded controller register dump 38 - Experimental: embedded controller register dump
33 - LCD brightness control 39 - LCD brightness control
34 - Volume control 40 - Volume control
35 - Experimental: fan speed, fan enable/disable 41 - Fan control and monitoring: fan speed, fan enable/disable
36 - Experimental: WAN enable and disable 42 - Experimental: WAN enable and disable
37 43
38A compatibility table by model and feature is maintained on the web 44A compatibility table by model and feature is maintained on the web
@@ -42,6 +48,8 @@ Please include the following information in your report:
42 48
43 - ThinkPad model name 49 - ThinkPad model name
44 - a copy of your DSDT, from /proc/acpi/dsdt 50 - a copy of your DSDT, from /proc/acpi/dsdt
51 - a copy of the output of dmidecode, with serial numbers
52 and UUIDs masked off
45 - which driver features work and which don't 53 - which driver features work and which don't
46 - the observed behavior of non-working features 54 - the observed behavior of non-working features
47 55
@@ -52,25 +60,85 @@ Installation
52------------ 60------------
53 61
54If you are compiling this driver as included in the Linux kernel 62If you are compiling this driver as included in the Linux kernel
55sources, simply enable the CONFIG_ACPI_IBM option (Power Management / 63sources, simply enable the CONFIG_THINKPAD_ACPI option, and optionally
56ACPI / IBM ThinkPad Laptop Extras). 64enable the CONFIG_THINKPAD_ACPI_BAY option if you want the
65thinkpad-specific bay functionality.
57 66
58Features 67Features
59-------- 68--------
60 69
61The driver creates the /proc/acpi/ibm directory. There is a file under 70The driver exports two different interfaces to userspace, which can be
62that directory for each feature described below. Note that while the 71used to access the features it provides. One is a legacy procfs-based
63driver is still in the alpha stage, the exact proc file format and 72interface, which will be removed at some time in the distant future.
64commands supported by the various features is guaranteed to change 73The other is a new sysfs-based interface which is not complete yet.
65frequently.
66 74
67Driver version -- /proc/acpi/ibm/driver 75The procfs interface creates the /proc/acpi/ibm directory. There is a
68--------------------------------------- 76file under that directory for each feature it supports. The procfs
77interface is mostly frozen, and will change very little if at all: it
78will not be extended to add any new functionality in the driver, instead
79all new functionality will be implemented on the sysfs interface.
80
81The sysfs interface tries to blend in the generic Linux sysfs subsystems
82and classes as much as possible. Since some of these subsystems are not
83yet ready or stabilized, it is expected that this interface will change,
84and any and all userspace programs must deal with it.
85
86
87Notes about the sysfs interface:
88
89Unlike what was done with the procfs interface, correctness when talking
90to the sysfs interfaces will be enforced, as will correctness in the
91thinkpad-acpi's implementation of sysfs interfaces.
92
93Also, any bugs in the thinkpad-acpi sysfs driver code or in the
94thinkpad-acpi's implementation of the sysfs interfaces will be fixed for
95maximum correctness, even if that means changing an interface in
96non-compatible ways. As these interfaces mature both in the kernel and
97in thinkpad-acpi, such changes should become quite rare.
98
99Applications interfacing to the thinkpad-acpi sysfs interfaces must
100follow all sysfs guidelines and correctly process all errors (the sysfs
101interface makes extensive use of errors). File descriptors and open /
102close operations to the sysfs inodes must also be properly implemented.
103
104The version of thinkpad-acpi's sysfs interface is exported by the driver
105as a driver attribute (see below).
106
107Sysfs driver attributes are on the driver's sysfs attribute space,
108for 2.6.20 this is /sys/bus/platform/drivers/thinkpad-acpi/.
109
110Sysfs device attributes are on the driver's sysfs attribute space,
111for 2.6.20 this is /sys/devices/platform/thinkpad-acpi/.
112
113Driver version
114--------------
115
116procfs: /proc/acpi/ibm/driver
117sysfs driver attribute: version
69 118
70The driver name and version. No commands can be written to this file. 119The driver name and version. No commands can be written to this file.
71 120
72Hot keys -- /proc/acpi/ibm/hotkey 121Sysfs interface version
73--------------------------------- 122-----------------------
123
124sysfs driver attribute: interface_version
125
126Version of the thinkpad-acpi sysfs interface, as an unsigned long
127(output in hex format: 0xAAAABBCC), where:
128 AAAA - major revision
129 BB - minor revision
130 CC - bugfix revision
131
132The sysfs interface version changelog for the driver can be found at the
133end of this document. Changes to the sysfs interface done by the kernel
134subsystems are not documented here, nor are they tracked by this
135attribute.
136
137Hot keys
138--------
139
140procfs: /proc/acpi/ibm/hotkey
141sysfs device attribute: hotkey/*
74 142
75Without this driver, only the Fn-F4 key (sleep button) generates an 143Without this driver, only the Fn-F4 key (sleep button) generates an
76ACPI event. With the driver loaded, the hotkey feature enabled and the 144ACPI event. With the driver loaded, the hotkey feature enabled and the
@@ -84,15 +152,6 @@ All labeled Fn-Fx key combinations generate distinct events. In
84addition, the lid microswitch and some docking station buttons may 152addition, the lid microswitch and some docking station buttons may
85also generate such events. 153also generate such events.
86 154
87The following commands can be written to this file:
88
89 echo enable > /proc/acpi/ibm/hotkey -- enable the hot keys feature
90 echo disable > /proc/acpi/ibm/hotkey -- disable the hot keys feature
91 echo 0xffff > /proc/acpi/ibm/hotkey -- enable all possible hot keys
92 echo 0x0000 > /proc/acpi/ibm/hotkey -- disable all possible hot keys
93 ... any other 4-hex-digit mask ...
94 echo reset > /proc/acpi/ibm/hotkey -- restore the original mask
95
96The bit mask allows some control over which hot keys generate ACPI 155The bit mask allows some control over which hot keys generate ACPI
97events. Not all bits in the mask can be modified. Not all bits that 156events. Not all bits in the mask can be modified. Not all bits that
98can be modified do anything. Not all hot keys can be individually 157can be modified do anything. Not all hot keys can be individually
@@ -124,15 +183,77 @@ buttons do not generate ACPI events even with this driver. They *can*
124be used through the "ThinkPad Buttons" utility, see 183be used through the "ThinkPad Buttons" utility, see
125http://www.nongnu.org/tpb/ 184http://www.nongnu.org/tpb/
126 185
127Bluetooth -- /proc/acpi/ibm/bluetooth 186procfs notes:
128------------------------------------- 187
188The following commands can be written to the /proc/acpi/ibm/hotkey file:
189
190 echo enable > /proc/acpi/ibm/hotkey -- enable the hot keys feature
191 echo disable > /proc/acpi/ibm/hotkey -- disable the hot keys feature
192 echo 0xffff > /proc/acpi/ibm/hotkey -- enable all possible hot keys
193 echo 0x0000 > /proc/acpi/ibm/hotkey -- disable all possible hot keys
194 ... any other 4-hex-digit mask ...
195 echo reset > /proc/acpi/ibm/hotkey -- restore the original mask
196
197sysfs notes:
198
199 The hot keys attributes are in a hotkey/ subdirectory off the
200 thinkpad device.
201
202 bios_enabled:
203 Returns the status of the hot keys feature when
204 thinkpad-acpi was loaded. Upon module unload, the hot
205 key feature status will be restored to this value.
206
207 0: hot keys were disabled
208 1: hot keys were enabled
209
210 bios_mask:
211 Returns the hot keys mask when thinkpad-acpi was loaded.
212 Upon module unload, the hot keys mask will be restored
213 to this value.
214
215 enable:
216 Enables/disables the hot keys feature, and reports
217 current status of the hot keys feature.
218
219 0: disables the hot keys feature / feature disabled
220 1: enables the hot keys feature / feature enabled
221
222 mask:
223 bit mask to enable ACPI event generation for each hot
224 key (see above). Returns the current status of the hot
225 keys mask, and allows one to modify it.
226
129 227
130This feature shows the presence and current state of a Bluetooth 228Bluetooth
131device. If Bluetooth is installed, the following commands can be used: 229---------
230
231procfs: /proc/acpi/ibm/bluetooth
232sysfs device attribute: bluetooth/enable
233
234This feature shows the presence and current state of a ThinkPad
235Bluetooth device in the internal ThinkPad CDC slot.
236
237Procfs notes:
238
239If Bluetooth is installed, the following commands can be used:
132 240
133 echo enable > /proc/acpi/ibm/bluetooth 241 echo enable > /proc/acpi/ibm/bluetooth
134 echo disable > /proc/acpi/ibm/bluetooth 242 echo disable > /proc/acpi/ibm/bluetooth
135 243
244Sysfs notes:
245
246 If the Bluetooth CDC card is installed, it can be enabled /
247 disabled through the "bluetooth/enable" thinkpad-acpi device
248 attribute, and its current status can also be queried.
249
250 enable:
251 0: disables Bluetooth / Bluetooth is disabled
252 1: enables Bluetooth / Bluetooth is enabled.
253
254 Note: this interface will be probably be superseeded by the
255 generic rfkill class.
256
136Video output control -- /proc/acpi/ibm/video 257Video output control -- /proc/acpi/ibm/video
137-------------------------------------------- 258--------------------------------------------
138 259
@@ -209,7 +330,7 @@ hot plugging of devices in the Linux ACPI framework. If the laptop was
209booted while not in the dock, the following message is shown in the 330booted while not in the dock, the following message is shown in the
210logs: 331logs:
211 332
212 Mar 17 01:42:34 aero kernel: ibm_acpi: dock device not present 333 Mar 17 01:42:34 aero kernel: thinkpad_acpi: dock device not present
213 334
214In this case, no dock-related events are generated but the dock and 335In this case, no dock-related events are generated but the dock and
215undock commands described below still work. They can be executed 336undock commands described below still work. They can be executed
@@ -269,7 +390,7 @@ This is due to the current lack of support for hot plugging of devices
269in the Linux ACPI framework. If the laptop was booted without the 390in the Linux ACPI framework. If the laptop was booted without the
270UltraBay, the following message is shown in the logs: 391UltraBay, the following message is shown in the logs:
271 392
272 Mar 17 01:42:34 aero kernel: ibm_acpi: bay device not present 393 Mar 17 01:42:34 aero kernel: thinkpad_acpi: bay device not present
273 394
274In this case, no bay-related events are generated but the eject 395In this case, no bay-related events are generated but the eject
275command described below still works. It can be executed manually or 396command described below still works. It can be executed manually or
@@ -313,23 +434,19 @@ supported. Use "eject2" instead of "eject" for the second bay.
313Note: the UltraBay eject support on the 600e/x, A22p and A3x is 434Note: the UltraBay eject support on the 600e/x, A22p and A3x is
314EXPERIMENTAL and may not work as expected. USE WITH CAUTION! 435EXPERIMENTAL and may not work as expected. USE WITH CAUTION!
315 436
316CMOS control -- /proc/acpi/ibm/cmos 437CMOS control
317----------------------------------- 438------------
439
440procfs: /proc/acpi/ibm/cmos
441sysfs device attribute: cmos_command
318 442
319This feature is used internally by the ACPI firmware to control the 443This feature is used internally by the ACPI firmware to control the
320ThinkLight on most newer ThinkPad models. It may also control LCD 444ThinkLight on most newer ThinkPad models. It may also control LCD
321brightness, sounds volume and more, but only on some models. 445brightness, sounds volume and more, but only on some models.
322 446
323The commands are non-negative integer numbers: 447The range of valid cmos command numbers is 0 to 21, but not all have an
324 448effect and the behavior varies from model to model. Here is the behavior
325 echo 0 >/proc/acpi/ibm/cmos 449on the X40 (tpb is the ThinkPad Buttons utility):
326 echo 1 >/proc/acpi/ibm/cmos
327 echo 2 >/proc/acpi/ibm/cmos
328 ...
329
330The range of valid numbers is 0 to 21, but not all have an effect and
331the behavior varies from model to model. Here is the behavior on the
332X40 (tpb is the ThinkPad Buttons utility):
333 450
334 0 - no effect but tpb reports "Volume down" 451 0 - no effect but tpb reports "Volume down"
335 1 - no effect but tpb reports "Volume up" 452 1 - no effect but tpb reports "Volume up"
@@ -342,6 +459,9 @@ X40 (tpb is the ThinkPad Buttons utility):
342 13 - ThinkLight off 459 13 - ThinkLight off
343 14 - no effect but tpb reports ThinkLight status change 460 14 - no effect but tpb reports ThinkLight status change
344 461
462The cmos command interface is prone to firmware split-brain problems, as
463in newer ThinkPads it is just a compatibility layer.
464
345LED control -- /proc/acpi/ibm/led 465LED control -- /proc/acpi/ibm/led
346--------------------------------- 466---------------------------------
347 467
@@ -393,17 +513,17 @@ X40:
393 16 - one medium-pitched beep repeating constantly, stop with 17 513 16 - one medium-pitched beep repeating constantly, stop with 17
394 17 - stop 16 514 17 - stop 16
395 515
396Temperature sensors -- /proc/acpi/ibm/thermal 516Temperature sensors
397--------------------------------------------- 517-------------------
518
519procfs: /proc/acpi/ibm/thermal
520sysfs device attributes: (hwmon) temp*_input
398 521
399Most ThinkPads include six or more separate temperature sensors but 522Most ThinkPads include six or more separate temperature sensors but
400only expose the CPU temperature through the standard ACPI methods. 523only expose the CPU temperature through the standard ACPI methods.
401This feature shows readings from up to eight different sensors on older 524This feature shows readings from up to eight different sensors on older
402ThinkPads, and it has experimental support for up to sixteen different 525ThinkPads, and it has experimental support for up to sixteen different
403sensors on newer ThinkPads. Readings from sensors that are not available 526sensors on newer ThinkPads.
404return -128.
405
406No commands can be written to this file.
407 527
408EXPERIMENTAL: The 16-sensors feature is marked EXPERIMENTAL because the 528EXPERIMENTAL: The 16-sensors feature is marked EXPERIMENTAL because the
409implementation directly accesses hardware registers and may not work as 529implementation directly accesses hardware registers and may not work as
@@ -460,6 +580,20 @@ The A31 has a very atypical layout for the thermal sensors
4608: Bay Battery: secondary sensor 5808: Bay Battery: secondary sensor
461 581
462 582
583Procfs notes:
584 Readings from sensors that are not available return -128.
585 No commands can be written to this file.
586
587Sysfs notes:
588 Sensors that are not available return the ENXIO error. This
589 status may change at runtime, as there are hotplug thermal
590 sensors, like those inside the batteries and docks.
591
592 thinkpad-acpi thermal sensors are reported through the hwmon
593 subsystem, and follow all of the hwmon guidelines at
594 Documentation/hwmon.
595
596
463EXPERIMENTAL: Embedded controller register dump -- /proc/acpi/ibm/ecdump 597EXPERIMENTAL: Embedded controller register dump -- /proc/acpi/ibm/ecdump
464------------------------------------------------------------------------ 598------------------------------------------------------------------------
465 599
@@ -472,7 +606,7 @@ This feature dumps the values of 256 embedded controller
472registers. Values which have changed since the last time the registers 606registers. Values which have changed since the last time the registers
473were dumped are marked with a star: 607were dumped are marked with a star:
474 608
475[root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump 609[root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump
476EC +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f 610EC +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f
477EC 0x00: a7 47 87 01 fe 96 00 08 01 00 cb 00 00 00 40 00 611EC 0x00: a7 47 87 01 fe 96 00 08 01 00 cb 00 00 00 40 00
478EC 0x10: 00 00 ff ff f4 3c 87 09 01 ff 42 01 ff ff 0d 00 612EC 0x10: 00 00 ff ff f4 3c 87 09 01 ff 42 01 ff ff 0d 00
@@ -503,7 +637,7 @@ vary. The second ensures that the fan-related values do vary, since
503the fan speed fluctuates a bit. The third will (hopefully) mark the 637the fan speed fluctuates a bit. The third will (hopefully) mark the
504fan register with a star: 638fan register with a star:
505 639
506[root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump 640[root@x40 ibm-acpi]# cat /proc/acpi/ibm/ecdump
507EC +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f 641EC +00 +01 +02 +03 +04 +05 +06 +07 +08 +09 +0a +0b +0c +0d +0e +0f
508EC 0x00: a7 47 87 01 fe 96 00 08 01 00 cb 00 00 00 40 00 642EC 0x00: a7 47 87 01 fe 96 00 08 01 00 cb 00 00 00 40 00
509EC 0x10: 00 00 ff ff f4 3c 87 09 01 ff 42 01 ff ff 0d 00 643EC 0x10: 00 00 ff ff f4 3c 87 09 01 ff 42 01 ff ff 0d 00
@@ -533,19 +667,59 @@ registers contain the current battery capacity, etc. If you experiment
533with this, do send me your results (including some complete dumps with 667with this, do send me your results (including some complete dumps with
534a description of the conditions when they were taken.) 668a description of the conditions when they were taken.)
535 669
536LCD brightness control -- /proc/acpi/ibm/brightness 670LCD brightness control
537--------------------------------------------------- 671----------------------
672
673procfs: /proc/acpi/ibm/brightness
674sysfs backlight device "thinkpad_screen"
538 675
539This feature allows software control of the LCD brightness on ThinkPad 676This feature allows software control of the LCD brightness on ThinkPad
540models which don't have a hardware brightness slider. The available 677models which don't have a hardware brightness slider.
541commands are: 678
679It has some limitations: the LCD backlight cannot be actually turned on or off
680by this interface, and in many ThinkPad models, the "dim while on battery"
681functionality will be enabled by the BIOS when this interface is used, and
682cannot be controlled.
683
684The backlight control has eight levels, ranging from 0 to 7. Some of the
685levels may not be distinct.
686
687Procfs notes:
688
689 The available commands are:
542 690
543 echo up >/proc/acpi/ibm/brightness 691 echo up >/proc/acpi/ibm/brightness
544 echo down >/proc/acpi/ibm/brightness 692 echo down >/proc/acpi/ibm/brightness
545 echo 'level <level>' >/proc/acpi/ibm/brightness 693 echo 'level <level>' >/proc/acpi/ibm/brightness
546 694
547The <level> number range is 0 to 7, although not all of them may be 695Sysfs notes:
548distinct. The current brightness level is shown in the file. 696
697The interface is implemented through the backlight sysfs class, which is poorly
698documented at this time.
699
700Locate the thinkpad_screen device under /sys/class/backlight, and inside it
701there will be the following attributes:
702
703 max_brightness:
704 Reads the maximum brightness the hardware can be set to.
705 The minimum is always zero.
706
707 actual_brightness:
708 Reads what brightness the screen is set to at this instant.
709
710 brightness:
711 Writes request the driver to change brightness to the given
712 value. Reads will tell you what brightness the driver is trying
713 to set the display to when "power" is set to zero and the display
714 has not been dimmed by a kernel power management event.
715
716 power:
717 power management mode, where 0 is "display on", and 1 to 3 will
718 dim the display backlight to brightness level 0 because
719 thinkpad-acpi cannot really turn the backlight off. Kernel
720 power management events can temporarily increase the current
721 power management level, i.e. they can dim the display.
722
549 723
550Volume control -- /proc/acpi/ibm/volume 724Volume control -- /proc/acpi/ibm/volume
551--------------------------------------- 725---------------------------------------
@@ -563,41 +737,42 @@ distinct. The unmute the volume after the mute command, use either the
563up or down command (the level command will not unmute the volume). 737up or down command (the level command will not unmute the volume).
564The current volume level and mute state is shown in the file. 738The current volume level and mute state is shown in the file.
565 739
566EXPERIMENTAL: fan speed, fan enable/disable -- /proc/acpi/ibm/fan 740Fan control and monitoring: fan speed, fan enable/disable
567----------------------------------------------------------------- 741---------------------------------------------------------
568 742
569This feature is marked EXPERIMENTAL because the implementation 743procfs: /proc/acpi/ibm/fan
570directly accesses hardware registers and may not work as expected. USE 744sysfs device attributes: (hwmon) fan_input, pwm1, pwm1_enable
571WITH CAUTION! To use this feature, you need to supply the 745
572experimental=1 parameter when loading the module. 746NOTE NOTE NOTE: fan control operations are disabled by default for
747safety reasons. To enable them, the module parameter "fan_control=1"
748must be given to thinkpad-acpi.
573 749
574This feature attempts to show the current fan speed, control mode and 750This feature attempts to show the current fan speed, control mode and
575other fan data that might be available. The speed is read directly 751other fan data that might be available. The speed is read directly
576from the hardware registers of the embedded controller. This is known 752from the hardware registers of the embedded controller. This is known
577to work on later R, T and X series ThinkPads but may show a bogus 753to work on later R, T, X and Z series ThinkPads but may show a bogus
578value on other models. 754value on other models.
579 755
580Most ThinkPad fans work in "levels". Level 0 stops the fan. The higher 756Fan levels:
581the level, the higher the fan speed, although adjacent levels often map
582to the same fan speed. 7 is the highest level, where the fan reaches
583the maximum recommended speed. Level "auto" means the EC changes the
584fan level according to some internal algorithm, usually based on
585readings from the thermal sensors. Level "disengaged" means the EC
586disables the speed-locked closed-loop fan control, and drives the fan as
587fast as it can go, which might exceed hardware limits, so use this level
588with caution.
589 757
590The fan usually ramps up or down slowly from one speed to another, 758Most ThinkPad fans work in "levels" at the firmware interface. Level 0
591and it is normal for the EC to take several seconds to react to fan 759stops the fan. The higher the level, the higher the fan speed, although
592commands. 760adjacent levels often map to the same fan speed. 7 is the highest
761level, where the fan reaches the maximum recommended speed.
593 762
594The fan may be enabled or disabled with the following commands: 763Level "auto" means the EC changes the fan level according to some
764internal algorithm, usually based on readings from the thermal sensors.
595 765
596 echo enable >/proc/acpi/ibm/fan 766There is also a "full-speed" level, also known as "disengaged" level.
597 echo disable >/proc/acpi/ibm/fan 767In this level, the EC disables the speed-locked closed-loop fan control,
768and drives the fan as fast as it can go, which might exceed hardware
769limits, so use this level with caution.
598 770
599Placing a fan on level 0 is the same as disabling it. Enabling a fan 771The fan usually ramps up or down slowly from one speed to another, and
600will try to place it in a safe level if it is too slow or disabled. 772it is normal for the EC to take several seconds to react to fan
773commands. The full-speed level may take up to two minutes to ramp up to
774maximum speed, and in some ThinkPads, the tachometer readings go stale
775while the EC is transitioning to the full-speed level.
601 776
602WARNING WARNING WARNING: do not leave the fan disabled unless you are 777WARNING WARNING WARNING: do not leave the fan disabled unless you are
603monitoring all of the temperature sensor readings and you are ready to 778monitoring all of the temperature sensor readings and you are ready to
@@ -615,46 +790,146 @@ fan is turned off when the CPU temperature drops to 49 degrees and the
615HDD temperature drops to 41 degrees. These thresholds cannot 790HDD temperature drops to 41 degrees. These thresholds cannot
616currently be controlled. 791currently be controlled.
617 792
793The ThinkPad's ACPI DSDT code will reprogram the fan on its own when
794certain conditions are met. It will override any fan programming done
795through thinkpad-acpi.
796
797The thinkpad-acpi kernel driver can be programmed to revert the fan
798level to a safe setting if userspace does not issue one of the procfs
799fan commands: "enable", "disable", "level" or "watchdog", or if there
800are no writes to pwm1_enable (or to pwm1 *if and only if* pwm1_enable is
801set to 1, manual mode) within a configurable amount of time of up to
802120 seconds. This functionality is called fan safety watchdog.
803
804Note that the watchdog timer stops after it enables the fan. It will be
805rearmed again automatically (using the same interval) when one of the
806above mentioned fan commands is received. The fan watchdog is,
807therefore, not suitable to protect against fan mode changes made through
808means other than the "enable", "disable", and "level" procfs fan
809commands, or the hwmon fan control sysfs interface.
810
811Procfs notes:
812
813The fan may be enabled or disabled with the following commands:
814
815 echo enable >/proc/acpi/ibm/fan
816 echo disable >/proc/acpi/ibm/fan
817
818Placing a fan on level 0 is the same as disabling it. Enabling a fan
819will try to place it in a safe level if it is too slow or disabled.
820
618The fan level can be controlled with the command: 821The fan level can be controlled with the command:
619 822
620 echo 'level <level>' > /proc/acpi/ibm/thermal 823 echo 'level <level>' > /proc/acpi/ibm/fan
621 824
622Where <level> is an integer from 0 to 7, or one of the words "auto" 825Where <level> is an integer from 0 to 7, or one of the words "auto" or
623or "disengaged" (without the quotes). Not all ThinkPads support the 826"full-speed" (without the quotes). Not all ThinkPads support the "auto"
624"auto" and "disengaged" levels. 827and "full-speed" levels. The driver accepts "disengaged" as an alias for
828"full-speed", and reports it as "disengaged" for backwards
829compatibility.
625 830
626On the X31 and X40 (and ONLY on those models), the fan speed can be 831On the X31 and X40 (and ONLY on those models), the fan speed can be
627controlled to a certain degree. Once the fan is running, it can be 832controlled to a certain degree. Once the fan is running, it can be
628forced to run faster or slower with the following command: 833forced to run faster or slower with the following command:
629 834
630 echo 'speed <speed>' > /proc/acpi/ibm/thermal 835 echo 'speed <speed>' > /proc/acpi/ibm/fan
631 836
632The sustainable range of fan speeds on the X40 appears to be from 837The sustainable range of fan speeds on the X40 appears to be from about
633about 3700 to about 7350. Values outside this range either do not have 8383700 to about 7350. Values outside this range either do not have any
634any effect or the fan speed eventually settles somewhere in that 839effect or the fan speed eventually settles somewhere in that range. The
635range. The fan cannot be stopped or started with this command. 840fan cannot be stopped or started with this command. This functionality
841is incomplete, and not available through the sysfs interface.
636 842
637The ThinkPad's ACPI DSDT code will reprogram the fan on its own when 843To program the safety watchdog, use the "watchdog" command.
638certain conditions are met. It will override any fan programming done
639through ibm-acpi.
640 844
641EXPERIMENTAL: WAN -- /proc/acpi/ibm/wan 845 echo 'watchdog <interval in seconds>' > /proc/acpi/ibm/fan
642--------------------------------------- 846
847If you want to disable the watchdog, use 0 as the interval.
848
849Sysfs notes:
850
851The sysfs interface follows the hwmon subsystem guidelines for the most
852part, and the exception is the fan safety watchdog.
853
854Writes to any of the sysfs attributes may return the EINVAL error if
855that operation is not supported in a given ThinkPad or if the parameter
856is out-of-bounds, and EPERM if it is forbidden. They may also return
857EINTR (interrupted system call), and EIO (I/O error while trying to talk
858to the firmware).
859
860Features not yet implemented by the driver return ENOSYS.
861
862hwmon device attribute pwm1_enable:
863 0: PWM offline (fan is set to full-speed mode)
864 1: Manual PWM control (use pwm1 to set fan level)
865 2: Hardware PWM control (EC "auto" mode)
866 3: reserved (Software PWM control, not implemented yet)
867
868 Modes 0 and 2 are not supported by all ThinkPads, and the
869 driver is not always able to detect this. If it does know a
870 mode is unsupported, it will return -EINVAL.
871
872hwmon device attribute pwm1:
873 Fan level, scaled from the firmware values of 0-7 to the hwmon
874 scale of 0-255. 0 means fan stopped, 255 means highest normal
875 speed (level 7).
876
877 This attribute only commands the fan if pmw1_enable is set to 1
878 (manual PWM control).
879
880hwmon device attribute fan1_input:
881 Fan tachometer reading, in RPM. May go stale on certain
882 ThinkPads while the EC transitions the PWM to offline mode,
883 which can take up to two minutes. May return rubbish on older
884 ThinkPads.
885
886driver attribute fan_watchdog:
887 Fan safety watchdog timer interval, in seconds. Minimum is
888 1 second, maximum is 120 seconds. 0 disables the watchdog.
889
890To stop the fan: set pwm1 to zero, and pwm1_enable to 1.
891
892To start the fan in a safe mode: set pwm1_enable to 2. If that fails
893with EINVAL, try to set pwm1_enable to 1 and pwm1 to at least 128 (255
894would be the safest choice, though).
895
896
897EXPERIMENTAL: WAN
898-----------------
899
900procfs: /proc/acpi/ibm/wan
901sysfs device attribute: wwan/enable
643 902
644This feature is marked EXPERIMENTAL because the implementation 903This feature is marked EXPERIMENTAL because the implementation
645directly accesses hardware registers and may not work as expected. USE 904directly accesses hardware registers and may not work as expected. USE
646WITH CAUTION! To use this feature, you need to supply the 905WITH CAUTION! To use this feature, you need to supply the
647experimental=1 parameter when loading the module. 906experimental=1 parameter when loading the module.
648 907
649This feature shows the presence and current state of a WAN (Sierra 908This feature shows the presence and current state of a W-WAN (Sierra
650Wireless EV-DO) device. If WAN is installed, the following commands can 909Wireless EV-DO) device.
651be used: 910
911It was tested on a Lenovo Thinkpad X60. It should probably work on other
912Thinkpad models which come with this module installed.
913
914Procfs notes:
915
916If the W-WAN card is installed, the following commands can be used:
652 917
653 echo enable > /proc/acpi/ibm/wan 918 echo enable > /proc/acpi/ibm/wan
654 echo disable > /proc/acpi/ibm/wan 919 echo disable > /proc/acpi/ibm/wan
655 920
656It was tested on a Lenovo Thinkpad X60. It should probably work on other 921Sysfs notes:
657Thinkpad models which come with this module installed. 922
923 If the W-WAN card is installed, it can be enabled /
924 disabled through the "wwan/enable" thinkpad-acpi device
925 attribute, and its current status can also be queried.
926
927 enable:
928 0: disables WWAN card / WWAN card is disabled
929 1: enables WWAN card / WWAN card is enabled.
930
931 Note: this interface will be probably be superseeded by the
932 generic rfkill class.
658 933
659Multiple Commands, Module Parameters 934Multiple Commands, Module Parameters
660------------------------------------ 935------------------------------------
@@ -665,64 +940,42 @@ separating them with commas, for example:
665 echo enable,0xffff > /proc/acpi/ibm/hotkey 940 echo enable,0xffff > /proc/acpi/ibm/hotkey
666 echo lcd_disable,crt_enable > /proc/acpi/ibm/video 941 echo lcd_disable,crt_enable > /proc/acpi/ibm/video
667 942
668Commands can also be specified when loading the ibm_acpi module, for 943Commands can also be specified when loading the thinkpad-acpi module,
669example: 944for example:
670 945
671 modprobe ibm_acpi hotkey=enable,0xffff video=auto_disable 946 modprobe thinkpad_acpi hotkey=enable,0xffff video=auto_disable
672 947
673The ibm-acpi kernel driver can be programmed to revert the fan level 948Enabling debugging output
674to a safe setting if userspace does not issue one of the fan commands: 949-------------------------
675"enable", "disable", "level" or "watchdog" within a configurable 950
676ammount of time. To do this, use the "watchdog" command. 951The module takes a debug paramater which can be used to selectively
677 952enable various classes of debugging output, for example:
678 echo 'watchdog <interval>' > /proc/acpi/ibm/fan 953
679 954 modprobe ibm_acpi debug=0xffff
680Interval is the ammount of time in seconds to wait for one of the 955
681above mentioned fan commands before reseting the fan level to a safe 956will enable all debugging output classes. It takes a bitmask, so
682one. If set to zero, the watchdog is disabled (default). When the 957to enable more than one output class, just add their values.
683watchdog timer runs out, it does the exact equivalent of the "enable" 958
684fan command. 959 Debug bitmask Description
685 960 0x0001 Initialization and probing
686Note that the watchdog timer stops after it enables the fan. It will 961 0x0002 Removal
687be rearmed again automatically (using the same interval) when one of 962
688the above mentioned fan commands is received. The fan watchdog is, 963There is also a kernel build option to enable more debugging
689therefore, not suitable to protect against fan mode changes made 964information, which may be necessary to debug driver problems.
690through means other than the "enable", "disable", and "level" fan 965
691commands. 966The level of debugging information output by the driver can be changed
692 967at runtime through sysfs, using the driver attribute debug_level. The
693 968attribute takes the same bitmask as the debug module parameter above.
694Example Configuration 969
695--------------------- 970Force loading of module
696 971-----------------------
697The ACPI support in the kernel is intended to be used in conjunction 972
698with a user-space daemon, acpid. The configuration files for this 973If thinkpad-acpi refuses to detect your ThinkPad, you can try to specify
699daemon control what actions are taken in response to various ACPI 974the module parameter force_load=1. Regardless of whether this works or
700events. An example set of configuration files are included in the 975not, please contact ibm-acpi-devel@lists.sourceforge.net with a report.
701config/ directory of the tarball package available on the web 976
702site. Note that these are provided for illustration purposes only and 977
703may need to be adapted to your particular setup. 978Sysfs interface changelog:
704 979
705The following utility scripts are used by the example action 9800x000100: Initial sysfs support, as a single platform driver and
706scripts (included with ibm-acpi for completeness): 981 device.
707
708 /usr/local/sbin/idectl -- from the hdparm source distribution,
709 see http://www.ibiblio.org/pub/Linux/system/hardware
710 /usr/local/sbin/laptop_mode -- from the Linux kernel source
711 distribution, see Documentation/laptop-mode.txt
712 /sbin/service -- comes with Redhat/Fedora distributions
713 /usr/sbin/hibernate -- from the Software Suspend 2 distribution,
714 see http://softwaresuspend.berlios.de/
715
716Toan T Nguyen <ntt@physics.ucla.edu> notes that Suse uses the
717powersave program to suspend ('powersave --suspend-to-ram') or
718hibernate ('powersave --suspend-to-disk'). This means that the
719hibernate script is not needed on that distribution.
720
721Henrik Brix Andersen <brix@gentoo.org> has written a Gentoo ACPI event
722handler script for the X31. You can get the latest version from
723http://dev.gentoo.org/~brix/files/x31.sh
724
725David Schweikert <dws@ee.eth.ch> has written an alternative blank.sh
726script which works on Debian systems. This scripts has now been
727extended to also work on Fedora systems and included as the default
728blank.sh in the distribution.
diff --git a/Documentation/video4linux/meye.txt b/Documentation/video4linux/meye.txt
index ecb34160e61d..5e51c59bf2b0 100644
--- a/Documentation/video4linux/meye.txt
+++ b/Documentation/video4linux/meye.txt
@@ -5,10 +5,9 @@ Vaio Picturebook Motion Eye Camera Driver Readme
5 Copyright (C) 2000 Andrew Tridgell <tridge@samba.org> 5 Copyright (C) 2000 Andrew Tridgell <tridge@samba.org>
6 6
7This driver enable the use of video4linux compatible applications with the 7This driver enable the use of video4linux compatible applications with the
8Motion Eye camera. This driver requires the "Sony Vaio Programmable I/O 8Motion Eye camera. This driver requires the "Sony Laptop Extras" driver (which
9Control Device" driver (which can be found in the "Character drivers" 9can be found in the "Misc devices" section of the kernel configuration utility)
10section of the kernel configuration utility) to be compiled and installed 10to be compiled and installed (using its "camera=1" parameter).
11(using its "camera=1" parameter).
12 11
13It can do at maximum 30 fps @ 320x240 or 15 fps @ 640x480. 12It can do at maximum 30 fps @ 320x240 or 15 fps @ 640x480.
14 13