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:
Merge branches 'release' and 'buildfix' into release
acer-wmi - Add documentation
sonypi - Move sonypi.txt to Documentation/laptops
sony-laptop - Move sony-laptop.txt to Documentation/laptops
thinkpad-acpi - Move thinkpad-acpi.txt to Documentation/laptops
Documentation - Create laptops sub-directory
ACPI: thermal: buildfix for CONFIG_THERMAL=n
cpuidle: build fix for non-x86
acer-wmi: Fix backlight on AMW0 (V1) laptops
tc1100-wmi: Mark as experimental
ACPI: SBS: Host controller must initialize before SBS.

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