aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-07 12:45:58 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-07 12:45:58 -0500
commitf0f1b3364ae7f48084bdf2837fb979ff59622523 (patch)
treee5ef68c0071f44178cc8d1948b64e216d57422aa /Documentation
parent4383f18b7f94a4d668c5eec68645c75d44556235 (diff)
parentb7143156c9ceee1a072c57aac8729d2dec5b3bf1 (diff)
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (112 commits) ACPI: fix build warning Revert "cpuidle: build fix for non-x86" ACPI: update intrd DSDT override console messages ACPI: update DSDT override documentation ACPI: Add "acpi_no_initrd_override" kernel parameter ACPI: its a directory not a folder.... ACPI: misc cleanups ACPI: add missing prink prefix strings ACPI: cleanup acpi.h ACPICA: fix CONFIG_ACPI_DEBUG_FUNC_TRACE build ACPI: video: Ignore ACPI video devices that aren't present in hardware ACPI: video: reset brightness on resume ACPI: video: call ACPI notifier chain for ACPI video notifications ACPI: create notifier chain to get hotkey events to graphics driver ACPI: video: delete unused display switch on hotkey event code ACPI: video: create "brightness_switch_enabled" modparam cpuidle: Add a poll_idle method ACPI: cpuidle: Support C1 idle time accounting ACPI: enable MWAIT for C1 idle ACPI: idle: Fix acpi_safe_halt usages and interrupt enabling/disabling ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/00-INDEX3
-rw-r--r--Documentation/ABI/testing/sysfs-firmware-acpi99
-rw-r--r--Documentation/acpi/dsdt-override.txt15
-rwxr-xr-xDocumentation/acpi/initramfs-add-dsdt.sh43
-rw-r--r--Documentation/acpi/method-tracing.txt26
-rw-r--r--Documentation/kernel-parameters.txt9
-rw-r--r--Documentation/power/swsusp.txt5
-rw-r--r--Documentation/thermal/sysfs-api.txt246
-rw-r--r--Documentation/thinkpad-acpi.txt116
9 files changed, 552 insertions, 10 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index d273b557a934..6e9c4050a41b 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -14,6 +14,7 @@ Following translations are available on the WWW:
14 - this file. 14 - this file.
15ABI/ 15ABI/
16 - info on kernel <-> userspace ABI and relative interface stability. 16 - info on kernel <-> userspace ABI and relative interface stability.
17
17BUG-HUNTING 18BUG-HUNTING
18 - brute force method of doing binary search of patches to find bug. 19 - brute force method of doing binary search of patches to find bug.
19Changes 20Changes
@@ -66,6 +67,8 @@ VGA-softcursor.txt
66 - how to change your VGA cursor from a blinking underscore. 67 - how to change your VGA cursor from a blinking underscore.
67accounting/ 68accounting/
68 - documentation on accounting and taskstats. 69 - documentation on accounting and taskstats.
70acpi/
71 - info on ACPI-specific hooks in the kernel.
69aoe/ 72aoe/
70 - description of AoE (ATA over Ethernet) along with config examples. 73 - description of AoE (ATA over Ethernet) along with config examples.
71applying-patches.txt 74applying-patches.txt
diff --git a/Documentation/ABI/testing/sysfs-firmware-acpi b/Documentation/ABI/testing/sysfs-firmware-acpi
new file mode 100644
index 000000000000..9470ed9afcc0
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-firmware-acpi
@@ -0,0 +1,99 @@
1What: /sys/firmware/acpi/interrupts/
2Date: February 2008
3Contact: Len Brown <lenb@kernel.org>
4Description:
5 All ACPI interrupts are handled via a single IRQ,
6 the System Control Interrupt (SCI), which appears
7 as "acpi" in /proc/interrupts.
8
9 However, one of the main functions of ACPI is to make
10 the platform understand random hardware without
11 special driver support. So while the SCI handles a few
12 well known (fixed feature) interrupts sources, such
13 as the power button, it can also handle a variable
14 number of a "General Purpose Events" (GPE).
15
16 A GPE vectors to a specified handler in AML, which
17 can do a anything the BIOS writer wants from
18 OS context. GPE 0x12, for example, would vector
19 to a level or edge handler called _L12 or _E12.
20 The handler may do its business and return.
21 Or the handler may send send a Notify event
22 to a Linux device driver registered on an ACPI device,
23 such as a battery, or a processor.
24
25 To figure out where all the SCI's are coming from,
26 /sys/firmware/acpi/interrupts contains a file listing
27 every possible source, and the count of how many
28 times it has triggered.
29
30 $ cd /sys/firmware/acpi/interrupts
31 $ grep . *
32 error:0
33 ff_gbl_lock:0
34 ff_pmtimer:0
35 ff_pwr_btn:0
36 ff_rt_clk:0
37 ff_slp_btn:0
38 gpe00:0
39 gpe01:0
40 gpe02:0
41 gpe03:0
42 gpe04:0
43 gpe05:0
44 gpe06:0
45 gpe07:0
46 gpe08:0
47 gpe09:174
48 gpe0A:0
49 gpe0B:0
50 gpe0C:0
51 gpe0D:0
52 gpe0E:0
53 gpe0F:0
54 gpe10:0
55 gpe11:60
56 gpe12:0
57 gpe13:0
58 gpe14:0
59 gpe15:0
60 gpe16:0
61 gpe17:0
62 gpe18:0
63 gpe19:7
64 gpe1A:0
65 gpe1B:0
66 gpe1C:0
67 gpe1D:0
68 gpe1E:0
69 gpe1F:0
70 gpe_all:241
71 sci:241
72
73 sci - The total number of times the ACPI SCI
74 has claimed an interrupt.
75
76 gpe_all - count of SCI caused by GPEs.
77
78 gpeXX - count for individual GPE source
79
80 ff_gbl_lock - Global Lock
81
82 ff_pmtimer - PM Timer
83
84 ff_pwr_btn - Power Button
85
86 ff_rt_clk - Real Time Clock
87
88 ff_slp_btn - Sleep Button
89
90 error - an interrupt that can't be accounted for above.
91
92 Root has permission to clear any of these counters. Eg.
93 # echo 0 > gpe11
94
95 All counters can be cleared by clearing the total "sci":
96 # echo 0 > sci
97
98 None of these counters has an effect on the function
99 of the system, they are simply statistics.
diff --git a/Documentation/acpi/dsdt-override.txt b/Documentation/acpi/dsdt-override.txt
new file mode 100644
index 000000000000..5008f256a2db
--- /dev/null
+++ b/Documentation/acpi/dsdt-override.txt
@@ -0,0 +1,15 @@
1Linux supports two methods of overriding the BIOS DSDT:
2
3CONFIG_ACPI_CUSTOM_DSDT builds the image into the kernel.
4
5CONFIG_ACPI_CUSTOM_DSDT_INITRD adds the image to the initrd.
6
7When to use these methods is described in detail on the
8Linux/ACPI home page:
9http://www.lesswatts.org/projects/acpi/overridingDSDT.php
10
11Note that if both options are used, the DSDT supplied
12by the INITRD method takes precedence.
13
14Documentation/initramfs-add-dsdt.sh is provided for convenience
15for use with the CONFIG_ACPI_CUSTOM_DSDT_INITRD method.
diff --git a/Documentation/acpi/initramfs-add-dsdt.sh b/Documentation/acpi/initramfs-add-dsdt.sh
new file mode 100755
index 000000000000..17ef6e838e14
--- /dev/null
+++ b/Documentation/acpi/initramfs-add-dsdt.sh
@@ -0,0 +1,43 @@
1#!/bin/bash
2# Adds a DSDT file to the initrd (if it's an initramfs)
3# first argument is the name of archive
4# second argument is the name of the file to add
5# The file will be copied as /DSDT.aml
6
7# 20060126: fix "Premature end of file" with some old cpio (Roland Robic)
8# 20060205: this time it should really work
9
10# check the arguments
11if [ $# -ne 2 ]; then
12 program_name=$(basename $0)
13 echo "\
14$program_name: too few arguments
15Usage: $program_name initrd-name.img DSDT-to-add.aml
16Adds a DSDT file to an initrd (in initramfs format)
17
18 initrd-name.img: filename of the initrd in initramfs format
19 DSDT-to-add.aml: filename of the DSDT file to add
20 " 1>&2
21 exit 1
22fi
23
24# we should check it's an initramfs
25
26tempcpio=$(mktemp -d)
27# cleanup on exit, hangup, interrupt, quit, termination
28trap 'rm -rf $tempcpio' 0 1 2 3 15
29
30# extract the archive
31gunzip -c "$1" > "$tempcpio"/initramfs.cpio || exit 1
32
33# copy the DSDT file at the root of the directory so that we can call it "/DSDT.aml"
34cp -f "$2" "$tempcpio"/DSDT.aml
35
36# add the file
37cd "$tempcpio"
38(echo DSDT.aml | cpio --quiet -H newc -o -A -O "$tempcpio"/initramfs.cpio) || exit 1
39cd "$OLDPWD"
40
41# re-compress the archive
42gzip -c "$tempcpio"/initramfs.cpio > "$1"
43
diff --git a/Documentation/acpi/method-tracing.txt b/Documentation/acpi/method-tracing.txt
new file mode 100644
index 000000000000..f6efb1ea559a
--- /dev/null
+++ b/Documentation/acpi/method-tracing.txt
@@ -0,0 +1,26 @@
1/sys/module/acpi/parameters/:
2
3trace_method_name
4 The AML method name that the user wants to trace
5
6trace_debug_layer
7 The temporary debug_layer used when tracing the method.
8 Using 0xffffffff by default if it is 0.
9
10trace_debug_level
11 The temporary debug_level used when tracing the method.
12 Using 0x00ffffff by default if it is 0.
13
14trace_state
15 The status of the tracing feature.
16
17 "enabled" means this feature is enabled
18 and the AML method is traced every time it's executed.
19
20 "1" means this feature is enabled and the AML method
21 will only be traced during the next execution.
22
23 "disabled" means this feature is disabled.
24 Users can enable/disable this debug tracing feature by
25 "echo string > /sys/module/acpi/parameters/trace_state".
26 "string" should be one of "enable", "disable" and "1".
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 8fd5aa40585f..0dcbd266b442 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -147,8 +147,10 @@ and is between 256 and 4096 characters. It is defined in the file
147 default: 0 147 default: 0
148 148
149 acpi_sleep= [HW,ACPI] Sleep options 149 acpi_sleep= [HW,ACPI] Sleep options
150 Format: { s3_bios, s3_mode } 150 Format: { s3_bios, s3_mode, s3_beep }
151 See Documentation/power/video.txt 151 See Documentation/power/video.txt for s3_bios and s3_mode.
152 s3_beep is for debugging; it makes the PC's speaker beep
153 as soon as the kernel's real-mode entry point is called.
152 154
153 acpi_sci= [HW,ACPI] ACPI System Control Interrupt trigger mode 155 acpi_sci= [HW,ACPI] ACPI System Control Interrupt trigger mode
154 Format: { level | edge | high | low } 156 Format: { level | edge | high | low }
@@ -175,6 +177,9 @@ and is between 256 and 4096 characters. It is defined in the file
175 177
176 acpi_no_auto_ssdt [HW,ACPI] Disable automatic loading of SSDT 178 acpi_no_auto_ssdt [HW,ACPI] Disable automatic loading of SSDT
177 179
180 acpi_no_initrd_override [KNL,ACPI]
181 Disable loading custom ACPI tables from the initramfs
182
178 acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS 183 acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS
179 Format: To spoof as Windows 98: ="Microsoft Windows" 184 Format: To spoof as Windows 98: ="Microsoft Windows"
180 185
diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt
index aea7e9209667..9d60ab717a7b 100644
--- a/Documentation/power/swsusp.txt
+++ b/Documentation/power/swsusp.txt
@@ -386,6 +386,11 @@ before suspending; then remount them after resuming.
386There is a work-around for this problem. For more information, see 386There is a work-around for this problem. For more information, see
387Documentation/usb/persist.txt. 387Documentation/usb/persist.txt.
388 388
389Q: Can I suspend-to-disk using a swap partition under LVM?
390
391A: No. You can suspend successfully, but you'll not be able to
392resume. uswsusp should be able to work with LVM. See suspend.sf.net.
393
389Q: I upgraded the kernel from 2.6.15 to 2.6.16. Both kernels were 394Q: I upgraded the kernel from 2.6.15 to 2.6.16. Both kernels were
390compiled with the similar configuration files. Anyway I found that 395compiled with the similar configuration files. Anyway I found that
391suspend to disk (and resume) is much slower on 2.6.16 compared to 396suspend to disk (and resume) is much slower on 2.6.16 compared to
diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
new file mode 100644
index 000000000000..5776e090359d
--- /dev/null
+++ b/Documentation/thermal/sysfs-api.txt
@@ -0,0 +1,246 @@
1Generic Thermal Sysfs driver How To
2=========================
3
4Written by Sujith Thomas <sujith.thomas@intel.com>, Zhang Rui <rui.zhang@intel.com>
5
6Updated: 2 January 2008
7
8Copyright (c) 2008 Intel Corporation
9
10
110. Introduction
12
13The generic thermal sysfs provides a set of interfaces for thermal zone devices (sensors)
14and thermal cooling devices (fan, processor...) to register with the thermal management
15solution and to be a part of it.
16
17This how-to focusses on enabling new thermal zone and cooling devices to participate
18in thermal management.
19This solution is platform independent and any type of thermal zone devices and
20cooling devices should be able to make use of the infrastructure.
21
22The main task of the thermal sysfs driver is to expose thermal zone attributes as well
23as cooling device attributes to the user space.
24An intelligent thermal management application can make decisions based on inputs
25from thermal zone attributes (the current temperature and trip point temperature)
26and throttle appropriate devices.
27
28[0-*] denotes any positive number starting from 0
29[1-*] denotes any positive number starting from 1
30
311. thermal sysfs driver interface functions
32
331.1 thermal zone device interface
341.1.1 struct thermal_zone_device *thermal_zone_device_register(char *name, int trips,
35 void *devdata, struct thermal_zone_device_ops *ops)
36
37 This interface function adds a new thermal zone device (sensor) to
38 /sys/class/thermal folder as thermal_zone[0-*].
39 It tries to bind all the thermal cooling devices registered at the same time.
40
41 name: the thermal zone name.
42 trips: the total number of trip points this thermal zone supports.
43 devdata: device private data
44 ops: thermal zone device callbacks.
45 .bind: bind the thermal zone device with a thermal cooling device.
46 .unbind: unbing the thermal zone device with a thermal cooling device.
47 .get_temp: get the current temperature of the thermal zone.
48 .get_mode: get the current mode (user/kernel) of the thermal zone.
49 "kernel" means thermal management is done in kernel.
50 "user" will prevent kernel thermal driver actions upon trip points
51 so that user applications can take charge of thermal management.
52 .set_mode: set the mode (user/kernel) of the thermal zone.
53 .get_trip_type: get the type of certain trip point.
54 .get_trip_temp: get the temperature above which the certain trip point
55 will be fired.
56
571.1.2 void thermal_zone_device_unregister(struct thermal_zone_device *tz)
58
59 This interface function removes the thermal zone device.
60 It deletes the corresponding entry form /sys/class/thermal folder and unbind all
61 the thermal cooling devices it uses.
62
631.2 thermal cooling device interface
641.2.1 struct thermal_cooling_device *thermal_cooling_device_register(char *name,
65 void *devdata, struct thermal_cooling_device_ops *)
66
67 This interface function adds a new thermal cooling device (fan/processor/...) to
68 /sys/class/thermal/ folder as cooling_device[0-*].
69 It tries to bind itself to all the thermal zone devices register at the same time.
70 name: the cooling device name.
71 devdata: device private data.
72 ops: thermal cooling devices callbacks.
73 .get_max_state: get the Maximum throttle state of the cooling device.
74 .get_cur_state: get the Current throttle state of the cooling device.
75 .set_cur_state: set the Current throttle state of the cooling device.
76
771.2.2 void thermal_cooling_device_unregister(struct thermal_cooling_device *cdev)
78
79 This interface function remove the thermal cooling device.
80 It deletes the corresponding entry form /sys/class/thermal folder and unbind
81 itself from all the thermal zone devices using it.
82
831.3 interface for binding a thermal zone device with a thermal cooling device
841.3.1 int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
85 int trip, struct thermal_cooling_device *cdev);
86
87 This interface function bind a thermal cooling device to the certain trip point
88 of a thermal zone device.
89 This function is usually called in the thermal zone device .bind callback.
90 tz: the thermal zone device
91 cdev: thermal cooling device
92 trip: indicates which trip point the cooling devices is associated with
93 in this thermal zone.
94
951.3.2 int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz,
96 int trip, struct thermal_cooling_device *cdev);
97
98 This interface function unbind a thermal cooling device from the certain trip point
99 of a thermal zone device.
100 This function is usually called in the thermal zone device .unbind callback.
101 tz: the thermal zone device
102 cdev: thermal cooling device
103 trip: indicates which trip point the cooling devices is associated with
104 in this thermal zone.
105
1062. sysfs attributes structure
107
108RO read only value
109RW read/write value
110
111All thermal sysfs attributes will be represented under /sys/class/thermal
112/sys/class/thermal/
113
114Thermal zone device sys I/F, created once it's registered:
115|thermal_zone[0-*]:
116 |-----type: Type of the thermal zone
117 |-----temp: Current temperature
118 |-----mode: Working mode of the thermal zone
119 |-----trip_point_[0-*]_temp: Trip point temperature
120 |-----trip_point_[0-*]_type: Trip point type
121
122Thermal cooling device sys I/F, created once it's registered:
123|cooling_device[0-*]:
124 |-----type : Type of the cooling device(processor/fan/...)
125 |-----max_state: Maximum cooling state of the cooling device
126 |-----cur_state: Current cooling state of the cooling device
127
128
129These two dynamic attributes are created/removed in pairs.
130They represent the relationship between a thermal zone and its associated cooling device.
131They are created/removed for each
132thermal_zone_bind_cooling_device/thermal_zone_unbind_cooling_device successful exection.
133
134|thermal_zone[0-*]
135 |-----cdev[0-*]: The [0-*]th cooling device in the current thermal zone
136 |-----cdev[0-*]_trip_point: Trip point that cdev[0-*] is associated with
137
138
139***************************
140* Thermal zone attributes *
141***************************
142
143type Strings which represent the thermal zone type.
144 This is given by thermal zone driver as part of registration.
145 Eg: "ACPI thermal zone" indicates it's a ACPI thermal device
146 RO
147 Optional
148
149temp Current temperature as reported by thermal zone (sensor)
150 Unit: degree celsius
151 RO
152 Required
153
154mode One of the predifned values in [kernel, user]
155 This file gives information about the algorithm
156 that is currently managing the thermal zone.
157 It can be either default kernel based algorithm
158 or user space application.
159 RW
160 Optional
161 kernel = Thermal management in kernel thermal zone driver.
162 user = Preventing kernel thermal zone driver actions upon
163 trip points so that user application can take full
164 charge of the thermal management.
165
166trip_point_[0-*]_temp The temperature above which trip point will be fired
167 Unit: degree celsius
168 RO
169 Optional
170
171trip_point_[0-*]_type Strings which indicate the type of the trip point
172 Eg. it can be one of critical, hot, passive,
173 active[0-*] for ACPI thermal zone.
174 RO
175 Optional
176
177cdev[0-*] Sysfs link to the thermal cooling device node where the sys I/F
178 for cooling device throttling control represents.
179 RO
180 Optional
181
182cdev[0-*]_trip_point The trip point with which cdev[0-*] is assocated in this thermal zone
183 -1 means the cooling device is not associated with any trip point.
184 RO
185 Optional
186
187******************************
188* Cooling device attributes *
189******************************
190
191type String which represents the type of device
192 eg: For generic ACPI: this should be "Fan",
193 "Processor" or "LCD"
194 eg. For memory controller device on intel_menlow platform:
195 this should be "Memory controller"
196 RO
197 Optional
198
199max_state The maximum permissible cooling state of this cooling device.
200 RO
201 Required
202
203cur_state The current cooling state of this cooling device.
204 the value can any integer numbers between 0 and max_state,
205 cur_state == 0 means no cooling
206 cur_state == max_state means the maximum cooling.
207 RW
208 Required
209
2103. A simple implementation
211
212ACPI thermal zone may support multiple trip points like critical/hot/passive/active.
213If an ACPI thermal zone supports critical, passive, active[0] and active[1] at the same time,
214it may register itself as a thermale_zone_device (thermal_zone1) with 4 trip points in all.
215It has one processor and one fan, which are both registered as thermal_cooling_device.
216If the processor is listed in _PSL method, and the fan is listed in _AL0 method,
217the sys I/F structure will be built like this:
218
219/sys/class/thermal:
220
221|thermal_zone1:
222 |-----type: ACPI thermal zone
223 |-----temp: 37
224 |-----mode: kernel
225 |-----trip_point_0_temp: 100
226 |-----trip_point_0_type: critical
227 |-----trip_point_1_temp: 80
228 |-----trip_point_1_type: passive
229 |-----trip_point_2_temp: 70
230 |-----trip_point_2_type: active[0]
231 |-----trip_point_3_temp: 60
232 |-----trip_point_3_type: active[1]
233 |-----cdev0: --->/sys/class/thermal/cooling_device0
234 |-----cdev0_trip_point: 1 /* cdev0 can be used for passive */
235 |-----cdev1: --->/sys/class/thermal/cooling_device3
236 |-----cdev1_trip_point: 2 /* cdev1 can be used for active[0]*/
237
238|cooling_device0:
239 |-----type: Processor
240 |-----max_state: 8
241 |-----cur_state: 0
242
243|cooling_device3:
244 |-----type: Fan
245 |-----max_state: 2
246 |-----cur_state: 0
diff --git a/Documentation/thinkpad-acpi.txt b/Documentation/thinkpad-acpi.txt
index 10c041ca13c7..6c2477754a2a 100644
--- a/Documentation/thinkpad-acpi.txt
+++ b/Documentation/thinkpad-acpi.txt
@@ -1,7 +1,7 @@
1 ThinkPad ACPI Extras Driver 1 ThinkPad ACPI Extras Driver
2 2
3 Version 0.17 3 Version 0.19
4 October 04th, 2007 4 January 06th, 2008
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 Henrique de Moraes Holschuh <hmh@hmh.eng.br>
@@ -215,6 +215,11 @@ The following commands can be written to the /proc/acpi/ibm/hotkey file:
215 ... any other 8-hex-digit mask ... 215 ... any other 8-hex-digit mask ...
216 echo reset > /proc/acpi/ibm/hotkey -- restore the original mask 216 echo reset > /proc/acpi/ibm/hotkey -- restore the original mask
217 217
218The procfs interface does not support NVRAM polling control. So as to
219maintain maximum bug-to-bug compatibility, it does not report any masks,
220nor does it allow one to manipulate the hot key mask when the firmware
221does not support masks at all, even if NVRAM polling is in use.
222
218sysfs notes: 223sysfs notes:
219 224
220 hotkey_bios_enabled: 225 hotkey_bios_enabled:
@@ -231,17 +236,26 @@ sysfs notes:
231 to this value. 236 to this value.
232 237
233 hotkey_enable: 238 hotkey_enable:
234 Enables/disables the hot keys feature, and reports 239 Enables/disables the hot keys feature in the ACPI
235 current status of the hot keys feature. 240 firmware, and reports current status of the hot keys
241 feature. Has no effect on the NVRAM hot key polling
242 functionality.
236 243
237 0: disables the hot keys feature / feature disabled 244 0: disables the hot keys feature / feature disabled
238 1: enables the hot keys feature / feature enabled 245 1: enables the hot keys feature / feature enabled
239 246
240 hotkey_mask: 247 hotkey_mask:
241 bit mask to enable driver-handling and ACPI event 248 bit mask to enable driver-handling (and depending on
242 generation for each hot key (see above). Returns the 249 the firmware, ACPI event generation) for each hot key
243 current status of the hot keys mask, and allows one to 250 (see above). Returns the current status of the hot keys
244 modify it. 251 mask, and allows one to modify it.
252
253 Note: when NVRAM polling is active, the firmware mask
254 will be different from the value returned by
255 hotkey_mask. The driver will retain enabled bits for
256 hotkeys that are under NVRAM polling even if the
257 firmware refuses them, and will not set these bits on
258 the firmware hot key mask.
245 259
246 hotkey_all_mask: 260 hotkey_all_mask:
247 bit mask that should enable event reporting for all 261 bit mask that should enable event reporting for all
@@ -257,12 +271,48 @@ sysfs notes:
257 handled by the firmware anyway. Echo it to 271 handled by the firmware anyway. Echo it to
258 hotkey_mask above, to use. 272 hotkey_mask above, to use.
259 273
274 hotkey_source_mask:
275 bit mask that selects which hot keys will the driver
276 poll the NVRAM for. This is auto-detected by the driver
277 based on the capabilities reported by the ACPI firmware,
278 but it can be overridden at runtime.
279
280 Hot keys whose bits are set in both hotkey_source_mask
281 and also on hotkey_mask are polled for in NVRAM. Only a
282 few hot keys are available through CMOS NVRAM polling.
283
284 Warning: when in NVRAM mode, the volume up/down/mute
285 keys are synthesized according to changes in the mixer,
286 so you have to use volume up or volume down to unmute,
287 as per the ThinkPad volume mixer user interface. When
288 in ACPI event mode, volume up/down/mute are reported as
289 separate events, but this behaviour may be corrected in
290 future releases of this driver, in which case the
291 ThinkPad volume mixer user interface semanthics will be
292 enforced.
293
294 hotkey_poll_freq:
295 frequency in Hz for hot key polling. It must be between
296 0 and 25 Hz. Polling is only carried out when strictly
297 needed.
298
299 Setting hotkey_poll_freq to zero disables polling, and
300 will cause hot key presses that require NVRAM polling
301 to never be reported.
302
303 Setting hotkey_poll_freq too low will cause repeated
304 pressings of the same hot key to be misreported as a
305 single key press, or to not even be detected at all.
306 The recommended polling frequency is 10Hz.
307
260 hotkey_radio_sw: 308 hotkey_radio_sw:
261 if the ThinkPad has a hardware radio switch, this 309 if the ThinkPad has a hardware radio switch, this
262 attribute will read 0 if the switch is in the "radios 310 attribute will read 0 if the switch is in the "radios
263 disabled" postition, and 1 if the switch is in the 311 disabled" postition, and 1 if the switch is in the
264 "radios enabled" position. 312 "radios enabled" position.
265 313
314 This attribute has poll()/select() support.
315
266 hotkey_report_mode: 316 hotkey_report_mode:
267 Returns the state of the procfs ACPI event report mode 317 Returns the state of the procfs ACPI event report mode
268 filter for hot keys. If it is set to 1 (the default), 318 filter for hot keys. If it is set to 1 (the default),
@@ -277,6 +327,25 @@ sysfs notes:
277 May return -EPERM (write access locked out by module 327 May return -EPERM (write access locked out by module
278 parameter) or -EACCES (read-only). 328 parameter) or -EACCES (read-only).
279 329
330 wakeup_reason:
331 Set to 1 if the system is waking up because the user
332 requested a bay ejection. Set to 2 if the system is
333 waking up because the user requested the system to
334 undock. Set to zero for normal wake-ups or wake-ups
335 due to unknown reasons.
336
337 This attribute has poll()/select() support.
338
339 wakeup_hotunplug_complete:
340 Set to 1 if the system was waken up because of an
341 undock or bay ejection request, and that request
342 was sucessfully completed. At this point, it might
343 be useful to send the system back to sleep, at the
344 user's choice. Refer to HKEY events 0x4003 and
345 0x3003, below.
346
347 This attribute has poll()/select() support.
348
280input layer notes: 349input layer notes:
281 350
282A Hot key is mapped to a single input layer EV_KEY event, possibly 351A Hot key is mapped to a single input layer EV_KEY event, possibly
@@ -427,6 +496,23 @@ Non hot-key ACPI HKEY event map:
427The above events are not propagated by the driver, except for legacy 496The above events are not propagated by the driver, except for legacy
428compatibility purposes when hotkey_report_mode is set to 1. 497compatibility purposes when hotkey_report_mode is set to 1.
429 498
4990x2304 System is waking up from suspend to undock
5000x2305 System is waking up from suspend to eject bay
5010x2404 System is waking up from hibernation to undock
5020x2405 System is waking up from hibernation to eject bay
503
504The above events are never propagated by the driver.
505
5060x3003 Bay ejection (see 0x2x05) complete, can sleep again
5070x4003 Undocked (see 0x2x04), can sleep again
5080x5009 Tablet swivel: switched to tablet mode
5090x500A Tablet swivel: switched to normal mode
5100x500B Tablet pen insterted into its storage bay
5110x500C Tablet pen removed from its storage bay
5120x5010 Brightness level changed (newer Lenovo BIOSes)
513
514The above events are propagated by the driver.
515
430Compatibility notes: 516Compatibility notes:
431 517
432ibm-acpi and thinkpad-acpi 0.15 (mainline kernels before 2.6.23) never 518ibm-acpi and thinkpad-acpi 0.15 (mainline kernels before 2.6.23) never
@@ -1263,3 +1349,17 @@ Sysfs interface changelog:
1263 and the hwmon class for libsensors4 (lm-sensors 3) 1349 and the hwmon class for libsensors4 (lm-sensors 3)
1264 compatibility. Moved all hwmon attributes to this 1350 compatibility. Moved all hwmon attributes to this
1265 new platform device. 1351 new platform device.
1352
13530x020100: Marker for thinkpad-acpi with hot key NVRAM polling
1354 support. If you must, use it to know you should not
1355 start an userspace NVRAM poller (allows to detect when
1356 NVRAM is compiled out by the user because it is
1357 unneeded/undesired in the first place).
13580x020101: Marker for thinkpad-acpi with hot key NVRAM polling
1359 and proper hotkey_mask semanthics (version 8 of the
1360 NVRAM polling patch). Some development snapshots of
1361 0.18 had an earlier version that did strange things
1362 to hotkey_mask.
1363
13640x020200: Add poll()/select() support to the following attributes:
1365 hotkey_radio_sw, wakeup_hotunplug_complete, wakeup_reason