aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/DocBook/kernel-api.tmpl6
-rw-r--r--Documentation/kernel-parameters.txt32
-rw-r--r--Documentation/networking/bcm43xx.txt97
-rw-r--r--Documentation/powerpc/booting-without-of.txt256
-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
7 files changed, 715 insertions, 293 deletions
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl
index 0bb90237e230..b61dfc79e1b8 100644
--- a/Documentation/DocBook/kernel-api.tmpl
+++ b/Documentation/DocBook/kernel-api.tmpl
@@ -236,6 +236,12 @@ X!Ilib/string.c
236!Enet/core/dev.c 236!Enet/core/dev.c
237!Enet/ethernet/eth.c 237!Enet/ethernet/eth.c
238!Iinclude/linux/etherdevice.h 238!Iinclude/linux/etherdevice.h
239!Edrivers/net/phy/phy.c
240!Idrivers/net/phy/phy.c
241!Edrivers/net/phy/phy_device.c
242!Idrivers/net/phy/phy_device.c
243!Edrivers/net/phy/mdio_bus.c
244!Idrivers/net/phy/mdio_bus.c
239<!-- FIXME: Removed for now since no structured comments in source 245<!-- FIXME: Removed for now since no structured comments in source
240X!Enet/core/wireless.c 246X!Enet/core/wireless.c
241--> 247-->
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 2017942e0966..84c3bd05c639 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -181,19 +181,41 @@ and is between 256 and 4096 characters. It is defined in the file
181 that require a timer override, but don't have 181 that require a timer override, but don't have
182 HPET 182 HPET
183 183
184 acpi_dbg_layer= [HW,ACPI] 184 acpi.debug_layer= [HW,ACPI]
185 Format: <int> 185 Format: <int>
186 Each bit of the <int> indicates an ACPI debug layer, 186 Each bit of the <int> indicates an ACPI debug layer,
187 1: enable, 0: disable. It is useful for boot time 187 1: enable, 0: disable. It is useful for boot time
188 debugging. After system has booted up, it can be set 188 debugging. After system has booted up, it can be set
189 via /proc/acpi/debug_layer. 189 via /sys/module/acpi/parameters/debug_layer.
190 190 CONFIG_ACPI_DEBUG must be enabled for this to produce any output.
191 acpi_dbg_level= [HW,ACPI] 191 Available bits (add the numbers together) to enable debug output
192 for specific parts of the ACPI subsystem:
193 0x01 utilities 0x02 hardware 0x04 events 0x08 tables
194 0x10 namespace 0x20 parser 0x40 dispatcher
195 0x80 executer 0x100 resources 0x200 acpica debugger
196 0x400 os services 0x800 acpica disassembler.
197 The number can be in decimal or prefixed with 0x in hex.
198 Warning: Many of these options can produce a lot of
199 output and make your system unusable. Be very careful.
200
201 acpi.debug_level= [HW,ACPI]
192 Format: <int> 202 Format: <int>
193 Each bit of the <int> indicates an ACPI debug level, 203 Each bit of the <int> indicates an ACPI debug level,
194 1: enable, 0: disable. It is useful for boot time 204 1: enable, 0: disable. It is useful for boot time
195 debugging. After system has booted up, it can be set 205 debugging. After system has booted up, it can be set
196 via /proc/acpi/debug_level. 206 via /sys/module/acpi/parameters/debug_level.
207 CONFIG_ACPI_DEBUG must be enabled for this to produce any output.
208 Available bits (add the numbers together) to enable different
209 debug output levels of the ACPI subsystem:
210 0x01 error 0x02 warn 0x04 init 0x08 debug object
211 0x10 info 0x20 init names 0x40 parse 0x80 load
212 0x100 dispatch 0x200 execute 0x400 names 0x800 operation region
213 0x1000 bfield 0x2000 tables 0x4000 values 0x8000 objects
214 0x10000 resources 0x20000 user requests 0x40000 package.
215 The number can be in decimal or prefixed with 0x in hex.
216 Warning: Many of these options can produce a lot of
217 output and make your system unusable. Be very careful.
218
197 219
198 acpi_fake_ecdt [HW,ACPI] Workaround failure due to BIOS lacking ECDT 220 acpi_fake_ecdt [HW,ACPI] Workaround failure due to BIOS lacking ECDT
199 221
diff --git a/Documentation/networking/bcm43xx.txt b/Documentation/networking/bcm43xx.txt
index 28541d2bee1e..a136721499bf 100644
--- a/Documentation/networking/bcm43xx.txt
+++ b/Documentation/networking/bcm43xx.txt
@@ -2,35 +2,88 @@
2 BCM43xx Linux Driver Project 2 BCM43xx Linux Driver Project
3 ============================ 3 ============================
4 4
5About this software 5Introduction
6------------------- 6------------
7 7
8The goal of this project is to develop a linux driver for Broadcom 8Many of the wireless devices found in modern notebook computers are
9BCM43xx chips, based on the specification at 9based on the wireless chips produced by Broadcom. These devices have
10http://bcm-specs.sipsolutions.net/ 10been a problem for Linux users as there is no open-source driver
11available. In addition, Broadcom has not released specifications
12for the device, and driver availability has been limited to the
13binary-only form used in the GPL versions of AP hardware such as the
14Linksys WRT54G, and the Windows and OS X drivers. Before this project
15began, the only way to use these devices were to use the Windows or
16OS X drivers with either the Linuxant or ndiswrapper modules. There
17is a strong penalty if this method is used as loading the binary-only
18module "taints" the kernel, and no kernel developer will help diagnose
19any kernel problems.
11 20
12The project page is http://bcm43xx.berlios.de/ 21Development
22-----------
13 23
24This driver has been developed using
25a clean-room technique that is described at
26http://bcm-specs.sipsolutions.net/ReverseEngineeringProcess. For legal
27reasons, none of the clean-room crew works on the on the Linux driver,
28and none of the Linux developers sees anything but the specifications,
29which are the ultimate product of the reverse-engineering group.
14 30
15Requirements 31Software
16------------ 32--------
33
34Since the release of the 2.6.17 kernel, the bcm43xx driver has been
35distributed with the kernel source, and is prebuilt in most, if not
36all, distributions. There is, however, additional software that is
37required. The firmware used by the chip is the intellectual property
38of Broadcom and they have not given the bcm43xx team redistribution
39rights to this firmware. Since we cannot legally redistribute
40the firwmare we cannot include it with the driver. Furthermore, it
41cannot be placed in the downloadable archives of any distributing
42organization; therefore, the user is responsible for obtaining the
43firmware and placing it in the appropriate location so that the driver
44can find it when initializing.
45
46To help with this process, the bcm43xx developers provide a separate
47program named bcm43xx-fwcutter to "cut" the firmware out of a
48Windows or OS X driver and write the extracted files to the proper
49location. This program is usually provided with the distribution;
50however, it may be downloaded from
51
52http://developer.berlios.de/project/showfiles.php?group_id=4547
17 53
181) Linux Kernel 2.6.16 or later 54The firmware is available in two versions. V3 firmware is used with
19 http://www.kernel.org/ 55the in-kernel bcm43xx driver that uses a software MAC layer called
56SoftMAC, and will have a microcode revision of 0x127 or smaller. The
57V4 firmware is used by an out-of-kernel driver employing a variation of
58the Devicescape MAC layer known as d80211. Once bcm43xx-d80211 reaches
59a satisfactory level of development, it will replace bcm43xx-softmac
60in the kernel as it is much more flexible and powerful.
20 61
21 You may want to configure your kernel with: 62A source for the latest V3 firmware is
22 63
23 CONFIG_DEBUG_FS (optional): 64http://downloads.openwrt.org/sources/wl_apsta-3.130.20.0.o
24 -> Kernel hacking
25 -> Debug Filesystem
26 65
272) SoftMAC IEEE 802.11 Networking Stack extension and patched ieee80211 66Once this file is downloaded, the command
28 modules: 67'bcm43xx-fwcutter -w <dir> <filename>'
29 http://softmac.sipsolutions.net/ 68will extract the microcode and write it to directory
69<dir>. The correct directory will depend on your distribution;
70however, most use '/lib/firmware'. Once this step is completed,
71the bcm3xx driver should load when the system is booted. To see
72any messages relating to the driver, issue the command 'dmesg |
73grep bcm43xx' from a terminal window. If there are any problems,
74please send that output to Bcm43xx-dev@lists.berlios.de.
30 75
313) Firmware Files 76Although the driver has been in-kernel since 2.6.17, the earliest
77version is quite limited in its capability. Patches that include
78all features of later versions are available for the stable kernel
79versions from 2.6.18. These will be needed if you use a BCM4318,
80or a PCI Express version (BCM4311 and BCM4312). In addition, if you
81have an early BCM4306 and more than 1 GB RAM, your kernel will need
82to be patched. These patches, which are being updated regularly,
83are available at ftp://lwfinger.dynalias.org/patches. Look for
84combined_2.6.YY.patch. Of course you will need kernel source downloaded
85from kernel.org, or the source from your distribution.
32 86
33 Please try fwcutter. Fwcutter can extract the firmware from various 87If you build your own kernel, please enable CONFIG_BCM43XX_DEBUG
34 binary driver files. It supports driver files from Windows, MacOS and 88and CONFIG_IEEE80211_SOFTMAC_DEBUG. The log information provided is
35 Linux. You can get fwcutter from http://bcm43xx.berlios.de/. 89essential for solving any problems.
36 Also, fwcutter comes with a README file for further instructions.
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index b41397d6430a..033a3f3b3ab7 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -39,7 +39,7 @@
39 and property data. The old style variable 39 and property data. The old style variable
40 alignment would make it impossible to do 40 alignment would make it impossible to do
41 "simple" insertion of properties using 41 "simple" insertion of properties using
42 memove (thanks Milton for 42 memmove (thanks Milton for
43 noticing). Updated kernel patch as well 43 noticing). Updated kernel patch as well
44 - Correct a few more alignment constraints 44 - Correct a few more alignment constraints
45 - Add a chapter about the device-tree 45 - Add a chapter about the device-tree
@@ -55,7 +55,7 @@
55 55
56 ToDo: 56 ToDo:
57 - Add some definitions of interrupt tree (simple/complex) 57 - Add some definitions of interrupt tree (simple/complex)
58 - Add some definitions for pci host bridges 58 - Add some definitions for PCI host bridges
59 - Add some common address format examples 59 - Add some common address format examples
60 - Add definitions for standard properties and "compatible" 60 - Add definitions for standard properties and "compatible"
61 names for cells that are not already defined by the existing 61 names for cells that are not already defined by the existing
@@ -114,7 +114,7 @@ it with special cases.
114 forth words isn't required), you can enter the kernel with: 114 forth words isn't required), you can enter the kernel with:
115 115
116 r5 : OF callback pointer as defined by IEEE 1275 116 r5 : OF callback pointer as defined by IEEE 1275
117 bindings to powerpc. Only the 32 bit client interface 117 bindings to powerpc. Only the 32-bit client interface
118 is currently supported 118 is currently supported
119 119
120 r3, r4 : address & length of an initrd if any or 0 120 r3, r4 : address & length of an initrd if any or 0
@@ -194,7 +194,7 @@ it with special cases.
194 for this is to keep kernels on embedded systems small and efficient; 194 for this is to keep kernels on embedded systems small and efficient;
195 part of this is due to the fact the code is already that way. In the 195 part of this is due to the fact the code is already that way. In the
196 future, a kernel may support multiple platforms, but only if the 196 future, a kernel may support multiple platforms, but only if the
197 platforms feature the same core architectire. A single kernel build 197 platforms feature the same core architecture. A single kernel build
198 cannot support both configurations with Book E and configurations 198 cannot support both configurations with Book E and configurations
199 with classic Powerpc architectures. 199 with classic Powerpc architectures.
200 200
@@ -215,7 +215,7 @@ of the boot sequences.... someone speak up if this is wrong!
215 enable another config option to select the specific board 215 enable another config option to select the specific board
216 supported. 216 supported.
217 217
218NOTE: If ben doesn't merge the setup files, may need to change this to 218NOTE: If Ben doesn't merge the setup files, may need to change this to
219point to setup_32.c 219point to setup_32.c
220 220
221 221
@@ -256,7 +256,7 @@ struct boot_param_header {
256 u32 off_dt_struct; /* offset to structure */ 256 u32 off_dt_struct; /* offset to structure */
257 u32 off_dt_strings; /* offset to strings */ 257 u32 off_dt_strings; /* offset to strings */
258 u32 off_mem_rsvmap; /* offset to memory reserve map 258 u32 off_mem_rsvmap; /* offset to memory reserve map
259*/ 259 */
260 u32 version; /* format version */ 260 u32 version; /* format version */
261 u32 last_comp_version; /* last compatible version */ 261 u32 last_comp_version; /* last compatible version */
262 262
@@ -265,6 +265,9 @@ struct boot_param_header {
265 booting on */ 265 booting on */
266 /* version 3 fields below */ 266 /* version 3 fields below */
267 u32 size_dt_strings; /* size of the strings block */ 267 u32 size_dt_strings; /* size of the strings block */
268
269 /* version 17 fields below */
270 u32 size_dt_struct; /* size of the DT structure block */
268}; 271};
269 272
270 Along with the constants: 273 Along with the constants:
@@ -273,7 +276,7 @@ struct boot_param_header {
273#define OF_DT_HEADER 0xd00dfeed /* 4: version, 276#define OF_DT_HEADER 0xd00dfeed /* 4: version,
274 4: total size */ 277 4: total size */
275#define OF_DT_BEGIN_NODE 0x1 /* Start node: full name 278#define OF_DT_BEGIN_NODE 0x1 /* Start node: full name
276*/ 279 */
277#define OF_DT_END_NODE 0x2 /* End node */ 280#define OF_DT_END_NODE 0x2 /* End node */
278#define OF_DT_PROP 0x3 /* Property: name off, 281#define OF_DT_PROP 0x3 /* Property: name off,
279 size, content */ 282 size, content */
@@ -310,9 +313,8 @@ struct boot_param_header {
310 - off_mem_rsvmap 313 - off_mem_rsvmap
311 314
312 This is an offset from the beginning of the header to the start 315 This is an offset from the beginning of the header to the start
313 of the reserved memory map. This map is a list of pairs of 64 316 of the reserved memory map. This map is a list of pairs of 64-
314 bit integers. Each pair is a physical address and a size. The 317 bit integers. Each pair is a physical address and a size. The
315
316 list is terminated by an entry of size 0. This map provides the 318 list is terminated by an entry of size 0. This map provides the
317 kernel with a list of physical memory areas that are "reserved" 319 kernel with a list of physical memory areas that are "reserved"
318 and thus not to be used for memory allocations, especially during 320 and thus not to be used for memory allocations, especially during
@@ -325,7 +327,7 @@ struct boot_param_header {
325 contain _at least_ this DT block itself (header,total_size). If 327 contain _at least_ this DT block itself (header,total_size). If
326 you are passing an initrd to the kernel, you should reserve it as 328 you are passing an initrd to the kernel, you should reserve it as
327 well. You do not need to reserve the kernel image itself. The map 329 well. You do not need to reserve the kernel image itself. The map
328 should be 64 bit aligned. 330 should be 64-bit aligned.
329 331
330 - version 332 - version
331 333
@@ -335,10 +337,13 @@ struct boot_param_header {
335 to reallocate it easily at boot and free up the unused flattened 337 to reallocate it easily at boot and free up the unused flattened
336 structure after expansion. Version 16 introduces a new more 338 structure after expansion. Version 16 introduces a new more
337 "compact" format for the tree itself that is however not backward 339 "compact" format for the tree itself that is however not backward
338 compatible. You should always generate a structure of the highest 340 compatible. Version 17 adds an additional field, size_dt_struct,
339 version defined at the time of your implementation. Currently 341 allowing it to be reallocated or moved more easily (this is
340 that is version 16, unless you explicitly aim at being backward 342 particularly useful for bootloaders which need to make
341 compatible. 343 adjustments to a device tree based on probed information). You
344 should always generate a structure of the highest version defined
345 at the time of your implementation. Currently that is version 17,
346 unless you explicitly aim at being backward compatible.
342 347
343 - last_comp_version 348 - last_comp_version
344 349
@@ -347,7 +352,7 @@ struct boot_param_header {
347 is backward compatible with version 1 (that is, a kernel build 352 is backward compatible with version 1 (that is, a kernel build
348 for version 1 will be able to boot with a version 2 format). You 353 for version 1 will be able to boot with a version 2 format). You
349 should put a 1 in this field if you generate a device tree of 354 should put a 1 in this field if you generate a device tree of
350 version 1 to 3, or 0x10 if you generate a tree of version 0x10 355 version 1 to 3, or 16 if you generate a tree of version 16 or 17
351 using the new unit name format. 356 using the new unit name format.
352 357
353 - boot_cpuid_phys 358 - boot_cpuid_phys
@@ -360,6 +365,17 @@ struct boot_param_header {
360 point (see further chapters for more informations on the required 365 point (see further chapters for more informations on the required
361 device-tree contents) 366 device-tree contents)
362 367
368 - size_dt_strings
369
370 This field only exists on version 3 and later headers. It
371 gives the size of the "strings" section of the device tree (which
372 starts at the offset given by off_dt_strings).
373
374 - size_dt_struct
375
376 This field only exists on version 17 and later headers. It gives
377 the size of the "structure" section of the device tree (which
378 starts at the offset given by off_dt_struct).
363 379
364 So the typical layout of a DT block (though the various parts don't 380 So the typical layout of a DT block (though the various parts don't
365 need to be in that order) looks like this (addresses go from top to 381 need to be in that order) looks like this (addresses go from top to
@@ -417,7 +433,7 @@ root node who has no parent.
417A node has 2 names. The actual node name is generally contained in a 433A node has 2 names. The actual node name is generally contained in a
418property of type "name" in the node property list whose value is a 434property of type "name" in the node property list whose value is a
419zero terminated string and is mandatory for version 1 to 3 of the 435zero terminated string and is mandatory for version 1 to 3 of the
420format definition (as it is in Open Firmware). Version 0x10 makes it 436format definition (as it is in Open Firmware). Version 16 makes it
421optional as it can generate it from the unit name defined below. 437optional as it can generate it from the unit name defined below.
422 438
423There is also a "unit name" that is used to differentiate nodes with 439There is also a "unit name" that is used to differentiate nodes with
@@ -461,7 +477,7 @@ referencing another node via "phandle" is when laying out the
461interrupt tree which will be described in a further version of this 477interrupt tree which will be described in a further version of this
462document. 478document.
463 479
464This "linux, phandle" property is a 32 bit value that uniquely 480This "linux, phandle" property is a 32-bit value that uniquely
465identifies a node. You are free to use whatever values or system of 481identifies a node. You are free to use whatever values or system of
466values, internal pointers, or whatever to generate these, the only 482values, internal pointers, or whatever to generate these, the only
467requirement is that every node for which you provide that property has 483requirement is that every node for which you provide that property has
@@ -471,7 +487,7 @@ Here is an example of a simple device-tree. In this example, an "o"
471designates a node followed by the node unit name. Properties are 487designates a node followed by the node unit name. Properties are
472presented with their name followed by their content. "content" 488presented with their name followed by their content. "content"
473represents an ASCII string (zero terminated) value, while <content> 489represents an ASCII string (zero terminated) value, while <content>
474represents a 32 bit hexadecimal value. The various nodes in this 490represents a 32-bit hexadecimal value. The various nodes in this
475example will be discussed in a later chapter. At this point, it is 491example will be discussed in a later chapter. At this point, it is
476only meant to give you a idea of what a device-tree looks like. I have 492only meant to give you a idea of what a device-tree looks like. I have
477purposefully kept the "name" and "linux,phandle" properties which 493purposefully kept the "name" and "linux,phandle" properties which
@@ -543,15 +559,15 @@ Here's the basic structure of a single node:
543 * [align gap to next 4 bytes boundary] 559 * [align gap to next 4 bytes boundary]
544 * for each property: 560 * for each property:
545 * token OF_DT_PROP (that is 0x00000003) 561 * token OF_DT_PROP (that is 0x00000003)
546 * 32 bit value of property value size in bytes (or 0 of no 562 * 32-bit value of property value size in bytes (or 0 if no
547 * value) 563 value)
548 * 32 bit value of offset in string block of property name 564 * 32-bit value of offset in string block of property name
549 * property value data if any 565 * property value data if any
550 * [align gap to next 4 bytes boundary] 566 * [align gap to next 4 bytes boundary]
551 * [child nodes if any] 567 * [child nodes if any]
552 * token OF_DT_END_NODE (that is 0x00000002) 568 * token OF_DT_END_NODE (that is 0x00000002)
553 569
554So the node content can be summarised as a start token, a full path, 570So the node content can be summarized as a start token, a full path,
555a list of properties, a list of child nodes, and an end token. Every 571a list of properties, a list of child nodes, and an end token. Every
556child node is a full node structure itself as defined above. 572child node is a full node structure itself as defined above.
557 573
@@ -583,7 +599,7 @@ provide those properties yourself.
583---------------------------------------------- 599----------------------------------------------
584 600
585The general rule is documented in the various Open Firmware 601The general rule is documented in the various Open Firmware
586documentations. If you chose to describe a bus with the device-tree 602documentations. If you choose to describe a bus with the device-tree
587and there exist an OF bus binding, then you should follow the 603and there exist an OF bus binding, then you should follow the
588specification. However, the kernel does not require every single 604specification. However, the kernel does not require every single
589device or bus to be described by the device tree. 605device or bus to be described by the device tree.
@@ -596,9 +612,9 @@ those properties defining addresses format for devices directly mapped
596on the processor bus. 612on the processor bus.
597 613
598Those 2 properties define 'cells' for representing an address and a 614Those 2 properties define 'cells' for representing an address and a
599size. A "cell" is a 32 bit number. For example, if both contain 2 615size. A "cell" is a 32-bit number. For example, if both contain 2
600like the example tree given above, then an address and a size are both 616like the example tree given above, then an address and a size are both
601composed of 2 cells, and each is a 64 bit number (cells are 617composed of 2 cells, and each is a 64-bit number (cells are
602concatenated and expected to be in big endian format). Another example 618concatenated and expected to be in big endian format). Another example
603is the way Apple firmware defines them, with 2 cells for an address 619is the way Apple firmware defines them, with 2 cells for an address
604and one cell for a size. Most 32-bit implementations should define 620and one cell for a size. Most 32-bit implementations should define
@@ -632,7 +648,7 @@ prom_parse.c file of the recent kernels for your bus type.
632 648
633The "reg" property only defines addresses and sizes (if #size-cells 649The "reg" property only defines addresses and sizes (if #size-cells
634is non-0) within a given bus. In order to translate addresses upward 650is non-0) within a given bus. In order to translate addresses upward
635(that is into parent bus addresses, and possibly into cpu physical 651(that is into parent bus addresses, and possibly into CPU physical
636addresses), all busses must contain a "ranges" property. If the 652addresses), all busses must contain a "ranges" property. If the
637"ranges" property is missing at a given level, it's assumed that 653"ranges" property is missing at a given level, it's assumed that
638translation isn't possible. The format of the "ranges" property for a 654translation isn't possible. The format of the "ranges" property for a
@@ -648,9 +664,9 @@ example, for a PCI host controller, that would be a CPU address. For a
648PCI<->ISA bridge, that would be a PCI address. It defines the base 664PCI<->ISA bridge, that would be a PCI address. It defines the base
649address in the parent bus where the beginning of that range is mapped. 665address in the parent bus where the beginning of that range is mapped.
650 666
651For a new 64 bit powerpc board, I recommend either the 2/2 format or 667For a new 64-bit powerpc board, I recommend either the 2/2 format or
652Apple's 2/1 format which is slightly more compact since sizes usually 668Apple's 2/1 format which is slightly more compact since sizes usually
653fit in a single 32 bit word. New 32 bit powerpc boards should use a 669fit in a single 32-bit word. New 32-bit powerpc boards should use a
6541/1 format, unless the processor supports physical addresses greater 6701/1 format, unless the processor supports physical addresses greater
655than 32-bits, in which case a 2/1 format is recommended. 671than 32-bits, in which case a 2/1 format is recommended.
656 672
@@ -764,7 +780,7 @@ address which can extend beyond that limit.
764 Required properties: 780 Required properties:
765 781
766 - device_type : has to be "cpu" 782 - device_type : has to be "cpu"
767 - reg : This is the physical cpu number, it's a single 32 bit cell 783 - reg : This is the physical CPU number, it's a single 32-bit cell
768 and is also used as-is as the unit number for constructing the 784 and is also used as-is as the unit number for constructing the
769 unit name in the full path. For example, with 2 CPUs, you would 785 unit name in the full path. For example, with 2 CPUs, you would
770 have the full path: 786 have the full path:
@@ -785,7 +801,7 @@ address which can extend beyond that limit.
785 the kernel timebase/decrementer calibration based on this 801 the kernel timebase/decrementer calibration based on this
786 value. 802 value.
787 - clock-frequency : a cell indicating the CPU core clock frequency 803 - clock-frequency : a cell indicating the CPU core clock frequency
788 in Hz. A new property will be defined for 64 bit values, but if 804 in Hz. A new property will be defined for 64-bit values, but if
789 your frequency is < 4Ghz, one cell is enough. Here as well as 805 your frequency is < 4Ghz, one cell is enough. Here as well as
790 for the above, the common code doesn't use that property, but 806 for the above, the common code doesn't use that property, but
791 you are welcome to re-use the pSeries or Maple one. A future 807 you are welcome to re-use the pSeries or Maple one. A future
@@ -832,8 +848,7 @@ address which can extend beyond that limit.
832 848
833 This node is a bit "special". Normally, that's where open firmware 849 This node is a bit "special". Normally, that's where open firmware
834 puts some variable environment information, like the arguments, or 850 puts some variable environment information, like the arguments, or
835 phandle pointers to nodes like the main interrupt controller, or the 851 the default input/output devices.
836 default input/output devices.
837 852
838 This specification makes a few of these mandatory, but also defines 853 This specification makes a few of these mandatory, but also defines
839 some linux-specific properties that would be normally constructed by 854 some linux-specific properties that would be normally constructed by
@@ -853,14 +868,14 @@ address which can extend beyond that limit.
853 that the kernel tries to find out the default console and has 868 that the kernel tries to find out the default console and has
854 knowledge of various types like 8250 serial ports. You may want 869 knowledge of various types like 8250 serial ports. You may want
855 to extend this function to add your own. 870 to extend this function to add your own.
856 - interrupt-controller : This is one cell containing a phandle
857 value that matches the "linux,phandle" property of your main
858 interrupt controller node. May be used for interrupt routing.
859
860 871
861 Note that u-boot creates and fills in the chosen node for platforms 872 Note that u-boot creates and fills in the chosen node for platforms
862 that use it. 873 that use it.
863 874
875 (Note: a practice that is now obsolete was to include a property
876 under /chosen called interrupt-controller which had a phandle value
877 that pointed to the main interrupt controller)
878
864 f) the /soc<SOCname> node 879 f) the /soc<SOCname> node
865 880
866 This node is used to represent a system-on-a-chip (SOC) and must be 881 This node is used to represent a system-on-a-chip (SOC) and must be
@@ -908,8 +923,7 @@ address which can extend beyond that limit.
908 The SOC node may contain child nodes for each SOC device that the 923 The SOC node may contain child nodes for each SOC device that the
909 platform uses. Nodes should not be created for devices which exist 924 platform uses. Nodes should not be created for devices which exist
910 on the SOC but are not used by a particular platform. See chapter VI 925 on the SOC but are not used by a particular platform. See chapter VI
911 for more information on how to specify devices that are part of an 926 for more information on how to specify devices that are part of a SOC.
912SOC.
913 927
914 Example SOC node for the MPC8540: 928 Example SOC node for the MPC8540:
915 929
@@ -972,7 +986,7 @@ The syntax of the dtc tool is
972 [-o output-filename] [-V output_version] input_filename 986 [-o output-filename] [-V output_version] input_filename
973 987
974 988
975The "output_version" defines what versio of the "blob" format will be 989The "output_version" defines what version of the "blob" format will be
976generated. Supported versions are 1,2,3 and 16. The default is 990generated. Supported versions are 1,2,3 and 16. The default is
977currently version 3 but that may change in the future to version 16. 991currently version 3 but that may change in the future to version 16.
978 992
@@ -994,12 +1008,12 @@ supported currently at the toplevel.
994 */ 1008 */
995 1009
996 property2 = <1234abcd>; /* define a property containing a 1010 property2 = <1234abcd>; /* define a property containing a
997 * numerical 32 bits value (hexadecimal) 1011 * numerical 32-bit value (hexadecimal)
998 */ 1012 */
999 1013
1000 property3 = <12345678 12345678 deadbeef>; 1014 property3 = <12345678 12345678 deadbeef>;
1001 /* define a property containing 3 1015 /* define a property containing 3
1002 * numerical 32 bits values (cells) in 1016 * numerical 32-bit values (cells) in
1003 * hexadecimal 1017 * hexadecimal
1004 */ 1018 */
1005 property4 = [0a 0b 0c 0d de ea ad be ef]; 1019 property4 = [0a 0b 0c 0d de ea ad be ef];
@@ -1068,7 +1082,7 @@ while all this has been defined and implemented.
1068 its usage in early_init_devtree(), and the corresponding various 1082 its usage in early_init_devtree(), and the corresponding various
1069 early_init_dt_scan_*() callbacks. That code can be re-used in a 1083 early_init_dt_scan_*() callbacks. That code can be re-used in a
1070 GPL bootloader, and as the author of that code, I would be happy 1084 GPL bootloader, and as the author of that code, I would be happy
1071 to discuss possible free licencing to any vendor who wishes to 1085 to discuss possible free licensing to any vendor who wishes to
1072 integrate all or part of this code into a non-GPL bootloader. 1086 integrate all or part of this code into a non-GPL bootloader.
1073 1087
1074 1088
@@ -1077,7 +1091,7 @@ VI - System-on-a-chip devices and nodes
1077======================================= 1091=======================================
1078 1092
1079Many companies are now starting to develop system-on-a-chip 1093Many companies are now starting to develop system-on-a-chip
1080processors, where the processor core (cpu) and many peripheral devices 1094processors, where the processor core (CPU) and many peripheral devices
1081exist on a single piece of silicon. For these SOCs, an SOC node 1095exist on a single piece of silicon. For these SOCs, an SOC node
1082should be used that defines child nodes for the devices that make 1096should be used that defines child nodes for the devices that make
1083up the SOC. While platforms are not required to use this model in 1097up the SOC. While platforms are not required to use this model in
@@ -1109,42 +1123,7 @@ See appendix A for an example partial SOC node definition for the
1109MPC8540. 1123MPC8540.
1110 1124
1111 1125
11122) Specifying interrupt information for SOC devices 11262) Representing devices without a current OF specification
1113---------------------------------------------------
1114
1115Each device that is part of an SOC and which generates interrupts
1116should have the following properties:
1117
1118 - interrupt-parent : contains the phandle of the interrupt
1119 controller which handles interrupts for this device
1120 - interrupts : a list of tuples representing the interrupt
1121 number and the interrupt sense and level for each interrupt
1122 for this device.
1123
1124This information is used by the kernel to build the interrupt table
1125for the interrupt controllers in the system.
1126
1127Sense and level information should be encoded as follows:
1128
1129 Devices connected to openPIC-compatible controllers should encode
1130 sense and polarity as follows:
1131
1132 0 = low to high edge sensitive type enabled
1133 1 = active low level sensitive type enabled
1134 2 = active high level sensitive type enabled
1135 3 = high to low edge sensitive type enabled
1136
1137 ISA PIC interrupt controllers should adhere to the ISA PIC
1138 encodings listed below:
1139
1140 0 = active low level sensitive type enabled
1141 1 = active high level sensitive type enabled
1142 2 = high to low edge sensitive type enabled
1143 3 = low to high edge sensitive type enabled
1144
1145
1146
11473) Representing devices without a current OF specification
1148---------------------------------------------------------- 1127----------------------------------------------------------
1149 1128
1150Currently, there are many devices on SOCs that do not have a standard 1129Currently, there are many devices on SOCs that do not have a standard
@@ -1201,6 +1180,13 @@ platforms are moved over to use the flattened-device-tree model.
1201 - phy-handle : The phandle for the PHY connected to this ethernet 1180 - phy-handle : The phandle for the PHY connected to this ethernet
1202 controller. 1181 controller.
1203 1182
1183 Recommended properties:
1184
1185 - linux,network-index : This is the intended "index" of this
1186 network device. This is used by the bootwrapper to interpret
1187 MAC addresses passed by the firmware when no information other
1188 than indices is available to associate an address with a device.
1189
1204 Example: 1190 Example:
1205 1191
1206 ethernet@24000 { 1192 ethernet@24000 {
@@ -1312,10 +1298,10 @@ platforms are moved over to use the flattened-device-tree model.
1312 and additions : 1298 and additions :
1313 1299
1314 Required properties : 1300 Required properties :
1315 - compatible : Should be "fsl-usb2-mph" for multi port host usb 1301 - compatible : Should be "fsl-usb2-mph" for multi port host USB
1316 controllers, or "fsl-usb2-dr" for dual role usb controllers 1302 controllers, or "fsl-usb2-dr" for dual role USB controllers
1317 - phy_type : For multi port host usb controllers, should be one of 1303 - phy_type : For multi port host USB controllers, should be one of
1318 "ulpi", or "serial". For dual role usb controllers, should be 1304 "ulpi", or "serial". For dual role USB controllers, should be
1319 one of "ulpi", "utmi", "utmi_wide", or "serial". 1305 one of "ulpi", "utmi", "utmi_wide", or "serial".
1320 - reg : Offset and length of the register set for the device 1306 - reg : Offset and length of the register set for the device
1321 - port0 : boolean; if defined, indicates port0 is connected for 1307 - port0 : boolean; if defined, indicates port0 is connected for
@@ -1339,7 +1325,7 @@ platforms are moved over to use the flattened-device-tree model.
1339 - interrupt-parent : the phandle for the interrupt controller that 1325 - interrupt-parent : the phandle for the interrupt controller that
1340 services interrupts for this device. 1326 services interrupts for this device.
1341 1327
1342 Example multi port host usb controller device node : 1328 Example multi port host USB controller device node :
1343 usb@22000 { 1329 usb@22000 {
1344 device_type = "usb"; 1330 device_type = "usb";
1345 compatible = "fsl-usb2-mph"; 1331 compatible = "fsl-usb2-mph";
@@ -1353,7 +1339,7 @@ platforms are moved over to use the flattened-device-tree model.
1353 port1; 1339 port1;
1354 }; 1340 };
1355 1341
1356 Example dual role usb controller device node : 1342 Example dual role USB controller device node :
1357 usb@23000 { 1343 usb@23000 {
1358 device_type = "usb"; 1344 device_type = "usb";
1359 compatible = "fsl-usb2-dr"; 1345 compatible = "fsl-usb2-dr";
@@ -1387,7 +1373,7 @@ platforms are moved over to use the flattened-device-tree model.
1387 - channel-fifo-len : An integer representing the number of 1373 - channel-fifo-len : An integer representing the number of
1388 descriptor pointers each channel fetch fifo can hold. 1374 descriptor pointers each channel fetch fifo can hold.
1389 - exec-units-mask : The bitmask representing what execution units 1375 - exec-units-mask : The bitmask representing what execution units
1390 (EUs) are available. It's a single 32 bit cell. EU information 1376 (EUs) are available. It's a single 32-bit cell. EU information
1391 should be encoded following the SEC's Descriptor Header Dword 1377 should be encoded following the SEC's Descriptor Header Dword
1392 EU_SEL0 field documentation, i.e. as follows: 1378 EU_SEL0 field documentation, i.e. as follows:
1393 1379
@@ -1403,7 +1389,7 @@ platforms are moved over to use the flattened-device-tree model.
1403 bits 8 through 31 are reserved for future SEC EUs. 1389 bits 8 through 31 are reserved for future SEC EUs.
1404 1390
1405 - descriptor-types-mask : The bitmask representing what descriptors 1391 - descriptor-types-mask : The bitmask representing what descriptors
1406 are available. It's a single 32 bit cell. Descriptor type 1392 are available. It's a single 32-bit cell. Descriptor type
1407 information should be encoded following the SEC's Descriptor 1393 information should be encoded following the SEC's Descriptor
1408 Header Dword DESC_TYPE field documentation, i.e. as follows: 1394 Header Dword DESC_TYPE field documentation, i.e. as follows:
1409 1395
@@ -1492,7 +1478,7 @@ platforms are moved over to use the flattened-device-tree model.
1492 Required properties: 1478 Required properties:
1493 - device_type : should be "spi". 1479 - device_type : should be "spi".
1494 - compatible : should be "fsl_spi". 1480 - compatible : should be "fsl_spi".
1495 - mode : the spi operation mode, it can be "cpu" or "qe". 1481 - mode : the SPI operation mode, it can be "cpu" or "qe".
1496 - reg : Offset and length of the register set for the device 1482 - reg : Offset and length of the register set for the device
1497 - interrupts : <a b> where a is the interrupt number and b is a 1483 - interrupts : <a b> where a is the interrupt number and b is a
1498 field that represents an encoding of the sense and level 1484 field that represents an encoding of the sense and level
@@ -1569,6 +1555,12 @@ platforms are moved over to use the flattened-device-tree model.
1569 - mac-address : list of bytes representing the ethernet address. 1555 - mac-address : list of bytes representing the ethernet address.
1570 - phy-handle : The phandle for the PHY connected to this controller. 1556 - phy-handle : The phandle for the PHY connected to this controller.
1571 1557
1558 Recommended properties:
1559 - linux,network-index : This is the intended "index" of this
1560 network device. This is used by the bootwrapper to interpret
1561 MAC addresses passed by the firmware when no information other
1562 than indices is available to associate an address with a device.
1563
1572 Example: 1564 Example:
1573 ucc@2000 { 1565 ucc@2000 {
1574 device_type = "network"; 1566 device_type = "network";
@@ -1712,7 +1704,7 @@ platforms are moved over to use the flattened-device-tree model.
1712 - partitions : Several pairs of 32-bit values where the first value is 1704 - partitions : Several pairs of 32-bit values where the first value is
1713 partition's offset from the start of the device and the second one is 1705 partition's offset from the start of the device and the second one is
1714 partition size in bytes with LSB used to signify a read only 1706 partition size in bytes with LSB used to signify a read only
1715 partition (so, the parition size should always be an even number). 1707 partition (so, the partition size should always be an even number).
1716 - partition-names : The list of concatenated zero terminated strings 1708 - partition-names : The list of concatenated zero terminated strings
1717 representing the partition names. 1709 representing the partition names.
1718 - probe-type : The type of probe which should be done for the chip 1710 - probe-type : The type of probe which should be done for the chip
@@ -1733,6 +1725,92 @@ platforms are moved over to use the flattened-device-tree model.
1733 1725
1734 More devices will be defined as this spec matures. 1726 More devices will be defined as this spec matures.
1735 1727
1728VII - Specifying interrupt information for devices
1729===================================================
1730
1731The device tree represents the busses and devices of a hardware
1732system in a form similar to the physical bus topology of the
1733hardware.
1734
1735In addition, a logical 'interrupt tree' exists which represents the
1736hierarchy and routing of interrupts in the hardware.
1737
1738The interrupt tree model is fully described in the
1739document "Open Firmware Recommended Practice: Interrupt
1740Mapping Version 0.9". The document is available at:
1741<http://playground.sun.com/1275/practice>.
1742
17431) interrupts property
1744----------------------
1745
1746Devices that generate interrupts to a single interrupt controller
1747should use the conventional OF representation described in the
1748OF interrupt mapping documentation.
1749
1750Each device which generates interrupts must have an 'interrupt'
1751property. The interrupt property value is an arbitrary number of
1752of 'interrupt specifier' values which describe the interrupt or
1753interrupts for the device.
1754
1755The encoding of an interrupt specifier is determined by the
1756interrupt domain in which the device is located in the
1757interrupt tree. The root of an interrupt domain specifies in
1758its #interrupt-cells property the number of 32-bit cells
1759required to encode an interrupt specifier. See the OF interrupt
1760mapping documentation for a detailed description of domains.
1761
1762For example, the binding for the OpenPIC interrupt controller
1763specifies an #interrupt-cells value of 2 to encode the interrupt
1764number and level/sense information. All interrupt children in an
1765OpenPIC interrupt domain use 2 cells per interrupt in their interrupts
1766property.
1767
1768The PCI bus binding specifies a #interrupt-cell value of 1 to encode
1769which interrupt pin (INTA,INTB,INTC,INTD) is used.
1770
17712) interrupt-parent property
1772----------------------------
1773
1774The interrupt-parent property is specified to define an explicit
1775link between a device node and its interrupt parent in
1776the interrupt tree. The value of interrupt-parent is the
1777phandle of the parent node.
1778
1779If the interrupt-parent property is not defined for a node, it's
1780interrupt parent is assumed to be an ancestor in the node's
1781_device tree_ hierarchy.
1782
17833) OpenPIC Interrupt Controllers
1784--------------------------------
1785
1786OpenPIC interrupt controllers require 2 cells to encode
1787interrupt information. The first cell defines the interrupt
1788number. The second cell defines the sense and level
1789information.
1790
1791Sense and level information should be encoded as follows:
1792
1793 0 = low to high edge sensitive type enabled
1794 1 = active low level sensitive type enabled
1795 2 = active high level sensitive type enabled
1796 3 = high to low edge sensitive type enabled
1797
17984) ISA Interrupt Controllers
1799----------------------------
1800
1801ISA PIC interrupt controllers require 2 cells to encode
1802interrupt information. The first cell defines the interrupt
1803number. The second cell defines the sense and level
1804information.
1805
1806ISA PIC interrupt controllers should adhere to the ISA PIC
1807encodings listed below:
1808
1809 0 = active low level sensitive type enabled
1810 1 = active high level sensitive type enabled
1811 2 = high to low edge sensitive type enabled
1812 3 = low to high edge sensitive type enabled
1813
1736 1814
1737Appendix A - Sample SOC node for MPC8540 1815Appendix A - Sample SOC node for MPC8540
1738======================================== 1816========================================
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