drivers: power: report battery voltage in AOSP compatible format
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / Documentation / laptops / asus-laptop.txt
CommitLineData
6ce2c9d9
CC
1Asus Laptop Extras
2
3Version 0.1
4August 6, 2009
5
6Corentin Chary <corentincj@iksaif.net>
7http://acpi4asus.sf.net/
8
9 This driver provides support for extra features of ACPI-compatible ASUS laptops.
10 It may also support some MEDION, JVC or VICTOR laptops (such as MEDION 9675 or
11 VICTOR XP7210 for example). It makes all the extra buttons generate standard
12 ACPI events that go through /proc/acpi/events and input events (like keyboards).
13 On some models adds support for changing the display brightness and output,
14 switching the LCD backlight on and off, and most importantly, allows you to
15 blink those fancy LEDs intended for reporting mail and wireless status.
16
17This driver supercedes the old asus_acpi driver.
18
19Requirements
20------------
21
22 Kernel 2.6.X sources, configured for your computer, with ACPI support.
23 You also need CONFIG_INPUT and CONFIG_ACPI.
24
25Status
26------
27
28 The features currently supported are the following (see below for
29 detailed description):
30
31 - Fn key combinations
32 - Bluetooth enable and disable
33 - Wlan enable and disable
34 - GPS enable and disable
35 - Video output switching
36 - Ambient Light Sensor on and off
37 - LED control
38 - LED Display control
39 - LCD brightness control
40 - LCD on and off
41
42 A compatibility table by model and feature is maintained on the web
43 site, http://acpi4asus.sf.net/.
44
45Usage
46-----
47
7ec48ced 48 Try "modprobe asus-laptop". Check your dmesg (simply type dmesg). You should
6ce2c9d9
CC
49 see some lines like this :
50
51 Asus Laptop Extras version 0.42
52 L2D model detected.
53
54 If it is not the output you have on your laptop, send it (and the laptop's
55 DSDT) to me.
56
57 That's all, now, all the events generated by the hotkeys of your laptop
58 should be reported in your /proc/acpi/event entry. You can check with
59 "acpi_listen".
60
61 Hotkeys are also reported as input keys (like keyboards) you can check
62 which key are supported using "xev" under X11.
63
f65e51d7 64 You can get information on the version of your DSDT table by reading the
6ce2c9d9
CC
65 /sys/devices/platform/asus-laptop/infos entry. If you have a question or a
66 bug report to do, please include the output of this entry.
67
68LEDs
69----
70
71 You can modify LEDs be echoing values to /sys/class/leds/asus::*/brightness :
72 echo 1 > /sys/class/leds/asus::mail/brightness
73 will switch the mail LED on.
74 You can also know if they are on/off by reading their content and use
75 kernel triggers like ide-disk or heartbeat.
76
77Backlight
78---------
79
80 You can control lcd backlight power and brightness with
81 /sys/class/backlight/asus-laptop/. Brightness Values are between 0 and 15.
82
83Wireless devices
84---------------
85
86 You can turn the internal Bluetooth adapter on/off with the bluetooth entry
87 (only on models with Bluetooth). This usually controls the associated LED.
88 Same for Wlan adapter.
89
90Display switching
91-----------------
92
93 Note: the display switching code is currently considered EXPERIMENTAL.
94
95 Switching works for the following models:
96 L3800C
97 A2500H
98 L5800C
99 M5200N
100 W1000N (albeit with some glitches)
101 M6700R
102 A6JC
103 F3J
104
105 Switching doesn't work for the following:
106 M3700N
107 L2X00D (locks the laptop under certain conditions)
108
109 To switch the displays, echo values from 0 to 15 to
110 /sys/devices/platform/asus-laptop/display. The significance of those values
111 is as follows:
112
113 +-------+-----+-----+-----+-----+-----+
114 | Bin | Val | DVI | TV | CRT | LCD |
115 +-------+-----+-----+-----+-----+-----+
116 + 0000 + 0 + + + + +
117 +-------+-----+-----+-----+-----+-----+
118 + 0001 + 1 + + + + X +
119 +-------+-----+-----+-----+-----+-----+
120 + 0010 + 2 + + + X + +
121 +-------+-----+-----+-----+-----+-----+
122 + 0011 + 3 + + + X + X +
123 +-------+-----+-----+-----+-----+-----+
124 + 0100 + 4 + + X + + +
125 +-------+-----+-----+-----+-----+-----+
126 + 0101 + 5 + + X + + X +
127 +-------+-----+-----+-----+-----+-----+
128 + 0110 + 6 + + X + X + +
129 +-------+-----+-----+-----+-----+-----+
130 + 0111 + 7 + + X + X + X +
131 +-------+-----+-----+-----+-----+-----+
132 + 1000 + 8 + X + + + +
133 +-------+-----+-----+-----+-----+-----+
134 + 1001 + 9 + X + + + X +
135 +-------+-----+-----+-----+-----+-----+
136 + 1010 + 10 + X + + X + +
137 +-------+-----+-----+-----+-----+-----+
138 + 1011 + 11 + X + + X + X +
139 +-------+-----+-----+-----+-----+-----+
140 + 1100 + 12 + X + X + + +
141 +-------+-----+-----+-----+-----+-----+
142 + 1101 + 13 + X + X + + X +
143 +-------+-----+-----+-----+-----+-----+
144 + 1110 + 14 + X + X + X + +
145 +-------+-----+-----+-----+-----+-----+
146 + 1111 + 15 + X + X + X + X +
147 +-------+-----+-----+-----+-----+-----+
148
149 In most cases, the appropriate displays must be plugged in for the above
150 combinations to work. TV-Out may need to be initialized at boot time.
151
152 Debugging:
153 1) Check whether the Fn+F8 key:
57bdfdd8 154 a) does not lock the laptop (try a boot with noapic / nolapic if it does)
6ce2c9d9
CC
155 b) generates events (0x6n, where n is the value corresponding to the
156 configuration above)
157 c) actually works
158 Record the disp value at every configuration.
159 2) Echo values from 0 to 15 to /sys/devices/platform/asus-laptop/display.
160 Record its value, note any change. If nothing changes, try a broader range,
161 up to 65535.
162 3) Send ANY output (both positive and negative reports are needed, unless your
163 machine is already listed above) to the acpi4asus-user mailing list.
164
165 Note: on some machines (e.g. L3C), after the module has been loaded, only 0x6n
166 events are generated and no actual switching occurs. In such a case, a line
167 like:
168
169 echo $((10#$arg-60)) > /sys/devices/platform/asus-laptop/display
170
171 will usually do the trick ($arg is the 0000006n-like event passed to acpid).
172
173 Note: there is currently no reliable way to read display status on xxN
174 (Centrino) models.
175
176LED display
177-----------
178
179 Some models like the W1N have a LED display that can be used to display
f65e51d7 180 several items of information.
6ce2c9d9
CC
181
182 LED display works for the following models:
183 W1000N
184 W1J
185
186 To control the LED display, use the following :
187
188 echo 0x0T000DDD > /sys/devices/platform/asus-laptop/
189
190 where T control the 3 letters display, and DDD the 3 digits display,
191 according to the tables below.
192
193 DDD (digits)
194 000 to 999 = display digits
195 AAA = ---
196 BBB to FFF = turn-off
197
198 T (type)
199 0 = off
200 1 = dvd
201 2 = vcd
202 3 = mp3
203 4 = cd
204 5 = tv
205 6 = cpu
206 7 = vol
207
208 For example "echo 0x01000001 >/sys/devices/platform/asus-laptop/ledd"
209 would display "DVD001".
210
211Driver options:
212---------------
213
214 Options can be passed to the asus-laptop driver using the standard
215 module argument syntax (<param>=<value> when passing the option to the
216 module or asus-laptop.<param>=<value> on the kernel boot line when
217 asus-laptop is statically linked into the kernel).
218
219 wapf: WAPF defines the behavior of the Fn+Fx wlan key
220 The significance of values is yet to be found, but
221 most of the time:
222 - 0x0 should do nothing
223 - 0x1 should allow to control the device with Fn+Fx key.
224 - 0x4 should send an ACPI event (0x88) while pressing the Fn+Fx key
225 - 0x5 like 0x1 or 0x4
226
227 The default value is 0x1.
228
229Unsupported models
230------------------
231
232 These models will never be supported by this module, as they use a completely
233 different mechanism to handle LEDs and extra stuff (meaning we have no clue
234 how it works):
235
236 - ASUS A1300 (A1B), A1370D
237 - ASUS L7300G
238 - ASUS L8400
239
240Patches, Errors, Questions:
241--------------------------
242
243 I appreciate any success or failure
244 reports, especially if they add to or correct the compatibility table.
245 Please include the following information in your report:
246
247 - Asus model name
248 - a copy of your ACPI tables, using the "acpidump" utility
249 - a copy of /sys/devices/platform/asus-laptop/infos
250 - which driver features work and which don't
251 - the observed behavior of non-working features
252
253 Any other comments or patches are also more than welcome.
254
255 acpi4asus-user@lists.sourceforge.net
256 http://sourceforge.net/projects/acpi4asus
257