aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/00-INDEX8
-rw-r--r--Documentation/laptops/00-INDEX10
-rw-r--r--Documentation/laptops/acer-wmi.txt202
-rw-r--r--Documentation/laptops/sony-laptop.txt (renamed from Documentation/sony-laptop.txt)1
-rw-r--r--Documentation/laptops/sonypi.txt (renamed from Documentation/sonypi.txt)0
-rw-r--r--Documentation/laptops/thinkpad-acpi.txt (renamed from Documentation/thinkpad-acpi.txt)0
-rw-r--r--arch/x86/Kconfig3
-rw-r--r--drivers/acpi/Makefile2
-rw-r--r--drivers/acpi/sbs.c2
-rw-r--r--drivers/acpi/sbshc.c6
-rw-r--r--drivers/char/Kconfig2
-rw-r--r--drivers/cpuidle/cpuidle.c13
-rw-r--r--drivers/misc/Kconfig10
-rw-r--r--include/linux/thermal.h23
14 files changed, 265 insertions, 17 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX
index 6e9c4050a41b..8d556707bb68 100644
--- a/Documentation/00-INDEX
+++ b/Documentation/00-INDEX
@@ -227,6 +227,8 @@ kref.txt
227 - docs on adding reference counters (krefs) to kernel objects. 227 - docs on adding reference counters (krefs) to kernel objects.
228laptop-mode.txt 228laptop-mode.txt
229 - how to conserve battery power using laptop-mode. 229 - how to conserve battery power using laptop-mode.
230laptops/
231 - directory with laptop related info and laptop driver documentation.
230ldm.txt 232ldm.txt
231 - a brief description of LDM (Windows Dynamic Disks). 233 - a brief description of LDM (Windows Dynamic Disks).
232leds-class.txt 234leds-class.txt
@@ -351,10 +353,6 @@ sh/
351 - directory with info on porting Linux to a new architecture. 353 - directory with info on porting Linux to a new architecture.
352smart-config.txt 354smart-config.txt
353 - description of the Smart Config makefile feature. 355 - description of the Smart Config makefile feature.
354sony-laptop.txt
355 - Sony Notebook Control Driver (SNC) Readme.
356sonypi.txt
357 - info on Linux Sony Programmable I/O Device support.
358sound/ 356sound/
359 - directory with info on sound card support. 357 - directory with info on sound card support.
360sparc/ 358sparc/
@@ -385,8 +383,6 @@ sysrq.txt
385 - info on the magic SysRq key. 383 - info on the magic SysRq key.
386telephony/ 384telephony/
387 - directory with info on telephony (e.g. voice over IP) support. 385 - directory with info on telephony (e.g. voice over IP) support.
388thinkpad-acpi.txt
389 - information on the (IBM and Lenovo) ThinkPad ACPI Extras driver.
390time_interpolators.txt 386time_interpolators.txt
391 - info on time interpolators. 387 - info on time interpolators.
392tipar.txt 388tipar.txt
diff --git a/Documentation/laptops/00-INDEX b/Documentation/laptops/00-INDEX
new file mode 100644
index 000000000000..729c2c062e10
--- /dev/null
+++ b/Documentation/laptops/00-INDEX
@@ -0,0 +1,10 @@
100-INDEX
2 - This file
3acer-wmi.txt
4 - information on the Acer Laptop WMI Extras driver.
5sony-laptop.txt
6 - Sony Notebook Control Driver (SNC) Readme.
7sonypi.txt
8 - info on Linux Sony Programmable I/O Device support.
9thinkpad-acpi.txt
10 - information on the (IBM and Lenovo) ThinkPad ACPI Extras driver.
diff --git a/Documentation/laptops/acer-wmi.txt b/Documentation/laptops/acer-wmi.txt
new file mode 100644
index 000000000000..b06696329cff
--- /dev/null
+++ b/Documentation/laptops/acer-wmi.txt
@@ -0,0 +1,202 @@
1Acer Laptop WMI Extras Driver
2http://code.google.com/p/aceracpi
3Version 0.1
49th February 2008
5
6Copyright 2007-2008 Carlos Corbacho <carlos@strangeworlds.co.uk>
7
8acer-wmi is a driver to allow you to control various parts of your Acer laptop
9hardware under Linux which are exposed via ACPI-WMI.
10
11This driver completely replaces the old out-of-tree acer_acpi, which I am
12currently maintaining for bug fixes only on pre-2.6.25 kernels. All development
13work is now focused solely on acer-wmi.
14
15Disclaimer
16**********
17
18Acer and Wistron have provided nothing towards the development acer_acpi or
19acer-wmi. All information we have has been through the efforts of the developers
20and the users to discover as much as possible about the hardware.
21
22As such, I do warn that this could break your hardware - this is extremely
23unlikely of course, but please bear this in mind.
24
25Background
26**********
27
28acer-wmi is derived from acer_acpi, originally developed by Mark
29Smith in 2005, then taken over by Carlos Corbacho in 2007, in order to activate
30the wireless LAN card under a 64-bit version of Linux, as acerhk[1] (the
31previous solution to the problem) relied on making 32 bit BIOS calls which are
32not possible in kernel space from a 64 bit OS.
33
34[1] acerhk: http://www.cakey.de/acerhk/
35
36Supported Hardware
37******************
38
39Please see the website for the current list of known working hardare:
40
41http://code.google.com/p/aceracpi/wiki/SupportedHardware
42
43If your laptop is not listed, or listed as unknown, and works with acer-wmi,
44please contact me with a copy of the DSDT.
45
46If your Acer laptop doesn't work with acer-wmi, I would also like to see the
47DSDT.
48
49To send me the DSDT, as root/sudo:
50
51cat /sys/firmware/acpi/DSDT > dsdt
52
53And send me the resulting 'dsdt' file.
54
55Usage
56*****
57
58On Acer laptops, acer-wmi should already be autoloaded based on DMI matching.
59For non-Acer laptops, until WMI based autoloading support is added, you will
60need to manually load acer-wmi.
61
62acer-wmi creates /sys/devices/platform/acer-wmi, and fills it with various
63files whose usage is detailed below, which enables you to control some of the
64following (varies between models):
65
66* the wireless LAN card radio
67* inbuilt Bluetooth adapter
68* inbuilt 3G card
69* mail LED of your laptop
70* brightness of the LCD panel
71
72Wireless
73********
74
75With regards to wireless, all acer-wmi does is enable the radio on the card. It
76is not responsible for the wireless LED - once the radio is enabled, this is
77down to the wireless driver for your card. So the behaviour of the wireless LED,
78once you enable the radio, will depend on your hardware and driver combination.
79
80e.g. With the BCM4318 on the Acer Aspire 5020 series:
81
82ndiswrapper: Light blinks on when transmitting
83bcm43xx/b43: Solid light, blinks off when transmitting
84
85Wireless radio control is unconditionally enabled - all Acer laptops that support
86acer-wmi come with built-in wireless. However, should you feel so inclined to
87ever wish to remove the card, or swap it out at some point, please get in touch
88with me, as we may well be able to gain some data on wireless card detection.
89
90To read the status of the wireless radio (0=off, 1=on):
91cat /sys/devices/platform/acer-wmi/wireless
92
93To enable the wireless radio:
94echo 1 > /sys/devices/platform/acer-wmi/wireless
95
96To disable the wireless radio:
97echo 0 > /sys/devices/platform/acer-wmi/wireless
98
99To set the state of the wireless radio when loading acer-wmi, pass:
100wireless=X (where X is 0 or 1)
101
102Bluetooth
103*********
104
105For bluetooth, this is an internal USB dongle, so once enabled, you will get
106a USB device connection event, and a new USB device appears. When you disable
107bluetooth, you get the reverse - a USB device disconnect event, followed by the
108device disappearing again.
109
110Bluetooth is autodetected by acer-wmi, so if you do not have a bluetooth module
111installed in your laptop, this file won't exist (please be aware that it is
112quite common for Acer not to fit bluetooth to their laptops - so just because
113you have a bluetooth button on the laptop, doesn't mean that bluetooth is
114installed).
115
116For the adventurously minded - if you want to buy an internal bluetooth
117module off the internet that is compatible with your laptop and fit it, then
118it will work just fine with acer-wmi.
119
120To read the status of the bluetooth module (0=off, 1=on):
121cat /sys/devices/platform/acer-wmi/wireless
122
123To enable the bluetooth module:
124echo 1 > /sys/devices/platform/acer-wmi/bluetooth
125
126To disable the bluetooth module:
127echo 0 > /sys/devices/platform/acer-wmi/bluetooth
128
129To set the state of the bluetooth module when loading acer-wmi, pass:
130bluetooth=X (where X is 0 or 1)
131
1323G
133**
134
1353G is currently not autodetected, so the 'threeg' file is always created under
136sysfs. So far, no-one in possession of an Acer laptop with 3G built-in appears to
137have tried Linux, or reported back, so we don't have any information on this.
138
139If you have an Acer laptop that does have a 3G card in, please contact me so we
140can properly detect these, and find out a bit more about them.
141
142To read the status of the 3G card (0=off, 1=on):
143cat /sys/devices/platform/acer-wmi/threeg
144
145To enable the 3G card:
146echo 1 > /sys/devices/platform/acer-wmi/threeg
147
148To disable the 3G card:
149echo 0 > /sys/devices/platform/acer-wmi/threeg
150
151To set the state of the 3G card when loading acer-wmi, pass:
152threeg=X (where X is 0 or 1)
153
154Mail LED
155********
156
157This can be found in most older Acer laptops supported by acer-wmi, and many
158newer ones - it is built into the 'mail' button, and blinks when active.
159
160On newer (WMID) laptops though, we have no way of detecting the mail LED. If
161your laptop identifies itself in dmesg as a WMID model, then please try loading
162acer_acpi with:
163
164force_series=2490
165
166This will use a known alternative method of reading/ writing the mail LED. If
167it works, please report back to me with the DMI data from your laptop so this
168can be added to acer-wmi.
169
170The LED is exposed through the LED subsystem, and can be found in:
171
172/sys/devices/platform/acer-wmi/leds/acer-mail:green/
173
174The mail LED is autodetected, so if you don't have one, the LED device won't
175be registered.
176
177If you have a mail LED that is not green, please report this to me.
178
179Backlight
180*********
181
182The backlight brightness control is available on all acer-wmi supported
183hardware. The maximum brightness level is usually 15, but on some newer laptops
184it's 10 (this is again autodetected).
185
186The backlight is exposed through the backlight subsystem, and can be found in:
187
188/sys/devices/platform/acer-wmi/backlight/acer-wmi/
189
190Credits
191*******
192
193Olaf Tauber, who did the real hard work when he developed acerhk
194http://www.informatik.hu-berlin.de/~tauber/acerhk
195All the authors of laptop ACPI modules in the kernel, whose work
196was an inspiration in the early days of acer_acpi
197Mathieu Segaud, who solved the problem with having to modprobe the driver
198twice in acer_acpi 0.2.
199Jim Ramsay, who added support for the WMID interface
200Mark Smith, who started the original acer_acpi
201
202And the many people who have used both acer_acpi and acer-wmi.
diff --git a/Documentation/sony-laptop.txt b/Documentation/laptops/sony-laptop.txt
index 7a5c1a81905c..8b2bc1572d98 100644
--- a/Documentation/sony-laptop.txt
+++ b/Documentation/laptops/sony-laptop.txt
@@ -114,4 +114,3 @@ Bugs/Limitations:
114 sonypi driver (through /dev/sonypi) does not try to use the 114 sonypi driver (through /dev/sonypi) does not try to use the
115 sony-laptop driver. In the future, spicctrl could try sonypi first, 115 sony-laptop driver. In the future, spicctrl could try sonypi first,
116 and if it isn't present, try sony-laptop instead. 116 and if it isn't present, try sony-laptop instead.
117
diff --git a/Documentation/sonypi.txt b/Documentation/laptops/sonypi.txt
index 4857acfc50f1..4857acfc50f1 100644
--- a/Documentation/sonypi.txt
+++ b/Documentation/laptops/sonypi.txt
diff --git a/Documentation/thinkpad-acpi.txt b/Documentation/laptops/thinkpad-acpi.txt
index 6c2477754a2a..6c2477754a2a 100644
--- a/Documentation/thinkpad-acpi.txt
+++ b/Documentation/laptops/thinkpad-acpi.txt
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 65a70b777c12..a64d532dff4c 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -102,6 +102,9 @@ config ARCH_HAS_ILOG2_U32
102config ARCH_HAS_ILOG2_U64 102config ARCH_HAS_ILOG2_U64
103 def_bool n 103 def_bool n
104 104
105config ARCH_HAS_CPU_IDLE_WAIT
106 def_bool y
107
105config GENERIC_CALIBRATE_DELAY 108config GENERIC_CALIBRATE_DELAY
106 def_bool y 109 def_bool y
107 110
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
index f29812a86533..40b0fcae4c78 100644
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -60,5 +60,5 @@ obj-$(CONFIG_ACPI_ASUS) += asus_acpi.o
60obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o 60obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o
61obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o 61obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o
62obj-$(CONFIG_ACPI_PROCFS_POWER) += cm_sbs.o 62obj-$(CONFIG_ACPI_PROCFS_POWER) += cm_sbs.o
63obj-$(CONFIG_ACPI_SBS) += sbs.o
64obj-$(CONFIG_ACPI_SBS) += sbshc.o 63obj-$(CONFIG_ACPI_SBS) += sbshc.o
64obj-$(CONFIG_ACPI_SBS) += sbs.o
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index 1194105cc3ca..585ae3c9c8ea 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -827,7 +827,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
827#endif 827#endif
828 printk(KERN_INFO PREFIX "%s [%s]: Battery Slot [%s] (battery %s)\n", 828 printk(KERN_INFO PREFIX "%s [%s]: Battery Slot [%s] (battery %s)\n",
829 ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device), 829 ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device),
830 battery->name, sbs->battery->present ? "present" : "absent"); 830 battery->name, battery->present ? "present" : "absent");
831 return result; 831 return result;
832} 832}
833 833
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index ae9a90438e2f..a2cf3008ce6c 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -117,6 +117,11 @@ static int acpi_smbus_transaction(struct acpi_smb_hc *hc, u8 protocol,
117 int ret = -EFAULT, i; 117 int ret = -EFAULT, i;
118 u8 temp, sz = 0; 118 u8 temp, sz = 0;
119 119
120 if (!hc) {
121 printk(KERN_ERR PREFIX "host controller is not configured\n");
122 return ret;
123 }
124
120 mutex_lock(&hc->lock); 125 mutex_lock(&hc->lock);
121 if (smb_hc_read(hc, ACPI_SMB_PROTOCOL, &temp)) 126 if (smb_hc_read(hc, ACPI_SMB_PROTOCOL, &temp))
122 goto end; 127 goto end;
@@ -292,6 +297,7 @@ static int acpi_smbus_hc_remove(struct acpi_device *device, int type)
292 hc = acpi_driver_data(device); 297 hc = acpi_driver_data(device);
293 acpi_ec_remove_query_handler(hc->ec, hc->query_bit); 298 acpi_ec_remove_query_handler(hc->ec, hc->query_bit);
294 kfree(hc); 299 kfree(hc);
300 acpi_driver_data(device) = NULL;
295 return 0; 301 return 0;
296} 302}
297 303
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index f01ac9a07bf5..47c6be84fc84 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -875,7 +875,7 @@ config SONYPI
875 Device which can be found in many (all ?) Sony Vaio laptops. 875 Device which can be found in many (all ?) Sony Vaio laptops.
876 876
877 If you have one of those laptops, read 877 If you have one of those laptops, read
878 <file:Documentation/sonypi.txt>, and say Y or M here. 878 <file:Documentation/laptops/sonypi.txt>, and say Y or M here.
879 879
880 To compile this driver as a module, choose M here: the 880 To compile this driver as a module, choose M here: the
881 module will be called sonypi. 881 module will be called sonypi.
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 2c4b2d47973e..60f71e6345e3 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -27,6 +27,17 @@ static void (*pm_idle_old)(void);
27 27
28static int enabled_devices; 28static int enabled_devices;
29 29
30#if defined(CONFIG_ARCH_HAS_CPU_IDLE_WAIT)
31static void cpuidle_kick_cpus(void)
32{
33 cpu_idle_wait();
34}
35#elif defined(CONFIG_SMP)
36# error "Arch needs cpu_idle_wait() equivalent here"
37#else /* !CONFIG_ARCH_HAS_CPU_IDLE_WAIT && !CONFIG_SMP */
38static void cpuidle_kick_cpus(void) {}
39#endif
40
30/** 41/**
31 * cpuidle_idle_call - the main idle loop 42 * cpuidle_idle_call - the main idle loop
32 * 43 *
@@ -83,7 +94,7 @@ void cpuidle_uninstall_idle_handler(void)
83{ 94{
84 if (enabled_devices && (pm_idle != pm_idle_old)) { 95 if (enabled_devices && (pm_idle != pm_idle_old)) {
85 pm_idle = pm_idle_old; 96 pm_idle = pm_idle_old;
86 cpu_idle_wait(); 97 cpuidle_kick_cpus();
87 } 98 }
88} 99}
89 100
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 061b00d9b625..1abc95ca9dfa 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -114,6 +114,9 @@ config ACER_WMI
114 wireless radio and bluetooth control, and on some laptops, 114 wireless radio and bluetooth control, and on some laptops,
115 exposes the mail LED and LCD backlight. 115 exposes the mail LED and LCD backlight.
116 116
117 For more information about this driver see
118 <file:Documentation/laptops/acer-wmi.txt>
119
117 If you have an ACPI-WMI compatible Acer/ Wistron laptop, say Y or M 120 If you have an ACPI-WMI compatible Acer/ Wistron laptop, say Y or M
118 here. 121 here.
119 122
@@ -193,7 +196,7 @@ config SONY_LAPTOP
193 screen brightness control, Fn keys and allows powering on/off some 196 screen brightness control, Fn keys and allows powering on/off some
194 devices. 197 devices.
195 198
196 Read <file:Documentation/sony-laptop.txt> for more information. 199 Read <file:Documentation/laptops/sony-laptop.txt> for more information.
197 200
198config SONYPI_COMPAT 201config SONYPI_COMPAT
199 bool "Sonypi compatibility" 202 bool "Sonypi compatibility"
@@ -212,8 +215,9 @@ config THINKPAD_ACPI
212 This is a driver for the IBM and Lenovo ThinkPad laptops. It adds 215 This is a driver for the IBM and Lenovo ThinkPad laptops. It adds
213 support for Fn-Fx key combinations, Bluetooth control, video 216 support for Fn-Fx key combinations, Bluetooth control, video
214 output switching, ThinkLight control, UltraBay eject and more. 217 output switching, ThinkLight control, UltraBay eject and more.
215 For more information about this driver see 218 For more information about this driver see
216 <file:Documentation/thinkpad-acpi.txt> and <http://ibm-acpi.sf.net/> . 219 <file:Documentation/laptops/thinkpad-acpi.txt> and
220 <http://ibm-acpi.sf.net/> .
217 221
218 This driver was formerly known as ibm-acpi. 222 This driver was formerly known as ibm-acpi.
219 223
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index bba7712cadc7..818ca1cf0b6d 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -79,7 +79,9 @@ struct thermal_zone_device {
79}; 79};
80 80
81struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, 81struct thermal_zone_device *thermal_zone_device_register(char *, int, void *,
82 struct thermal_zone_device_ops *); 82 struct
83 thermal_zone_device_ops
84 *);
83void thermal_zone_device_unregister(struct thermal_zone_device *); 85void thermal_zone_device_unregister(struct thermal_zone_device *);
84 86
85int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, 87int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int,
@@ -87,8 +89,23 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int,
87int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, 89int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int,
88 struct thermal_cooling_device *); 90 struct thermal_cooling_device *);
89 91
92#ifdef CONFIG_THERMAL
90struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, 93struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
91 struct thermal_cooling_device_ops *); 94 struct
95 thermal_cooling_device_ops
96 *);
92void thermal_cooling_device_unregister(struct thermal_cooling_device *); 97void thermal_cooling_device_unregister(struct thermal_cooling_device *);
98#else
99static inline struct thermal_cooling_device
100*thermal_cooling_device_register(char *c, void *v,
101 struct thermal_cooling_device_ops *t)
102{
103 return NULL;
104}
105static inline
106 void thermal_cooling_device_unregister(struct thermal_cooling_device *t)
107{
108};
109#endif
93 110
94#endif /* __THERMAL_H__ */ 111#endif /* __THERMAL_H__ */