aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:25:58 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:25:58 -0500
commit7b791d445500c5674b1ef00fefc0e343ed2f85b7 (patch)
treefcb14a27185616c694817cbc4b534c91099abb6e /drivers
parent8811930dc74a503415b35c4a79d14fb0b408a361 (diff)
parent2e6c4e5101633a54aeee1f2e83020ee77fcb70d2 (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: acer-wmi, tc1100-wmi: select ACPI_WMI ACPI: WMI: Improve Kconfig description ACPI: DMI: add Panasonic CF-52 and Thinpad X61 ACPI: thermal: syntax, spelling, kernel-doc intel_menlo: build on X86 only ACPI: build WMI on X86 only ACPI: cpufreq: Print _PPC changes via cpufreq debug layer ACPI: add newline to printk
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/Kconfig20
-rw-r--r--drivers/acpi/blacklist.c20
-rw-r--r--drivers/acpi/osl.c2
-rw-r--r--drivers/acpi/processor_perflib.c7
-rw-r--r--drivers/misc/Kconfig5
-rw-r--r--drivers/thermal/Kconfig4
-rw-r--r--drivers/thermal/thermal.c49
7 files changed, 77 insertions, 30 deletions
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 7ef172c2a1d6..f688c214be0c 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -204,13 +204,25 @@ config ACPI_NUMA
204 204
205config ACPI_WMI 205config ACPI_WMI
206 tristate "WMI (EXPERIMENTAL)" 206 tristate "WMI (EXPERIMENTAL)"
207 depends on X86
207 depends on EXPERIMENTAL 208 depends on EXPERIMENTAL
208 help 209 help
209 This driver adds support for the ACPI-WMI mapper device (PNP0C14) 210 This driver adds support for the ACPI-WMI (Windows Management
210 found on some systems. 211 Instrumentation) mapper device (PNP0C14) found on some systems.
212
213 ACPI-WMI is a proprietary extension to ACPI to expose parts of the
214 ACPI firmware to userspace - this is done through various vendor
215 defined methods and data blocks in a PNP0C14 device, which are then
216 made available for userspace to call.
217
218 The implementation of this in Linux currently only exposes this to
219 other kernel space drivers.
220
221 This driver is a required dependency to build the firmware specific
222 drivers needed on many machines, including Acer and HP laptops.
211 223
212 NOTE: You will need another driver or userspace application on top of 224 It is safe to enable this driver even if your DSDT doesn't define
213 this to actually use anything defined in the ACPI-WMI mapper. 225 any ACPI-WMI devices.
214 226
215config ACPI_ASUS 227config ACPI_ASUS
216 tristate "ASUS/Medion Laptop Extras" 228 tristate "ASUS/Medion Laptop Extras"
diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
index 6dbaa2d15fe0..9ce983ed60f0 100644
--- a/drivers/acpi/blacklist.c
+++ b/drivers/acpi/blacklist.c
@@ -445,6 +445,8 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
445 * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T61"), 445 * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T61"),
446 * _OSI(Linux) is a NOP: 446 * _OSI(Linux) is a NOP:
447 * DMI_MATCH(DMI_PRODUCT_VERSION, "3000 N100"), 447 * DMI_MATCH(DMI_PRODUCT_VERSION, "3000 N100"),
448 * _OSI(Linux) effect unknown
449 * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"),
448 */ 450 */
449 { 451 {
450 .callback = dmi_enable_osi_linux, 452 .callback = dmi_enable_osi_linux,
@@ -464,6 +466,14 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
464 }, 466 },
465 { 467 {
466 .callback = dmi_unknown_osi_linux, 468 .callback = dmi_unknown_osi_linux,
469 .ident = "Lenovo ThinkPad X61",
470 .matches = {
471 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
472 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"),
473 },
474 },
475 {
476 .callback = dmi_unknown_osi_linux,
467 .ident = "Lenovo 3000 V100", 477 .ident = "Lenovo 3000 V100",
468 .matches = { 478 .matches = {
469 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 479 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
@@ -505,6 +515,16 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
505 DMI_MATCH(DMI_PRODUCT_NAME, "NEC VERSA M360"), 515 DMI_MATCH(DMI_PRODUCT_NAME, "NEC VERSA M360"),
506 }, 516 },
507 }, 517 },
518 /* Panasonic */
519 {
520 .callback = dmi_unknown_osi_linux,
521 .ident = "Panasonic",
522 .matches = {
523 DMI_MATCH(DMI_SYS_VENDOR, "Matsushita"),
524 /* Toughbook CF-52 */
525 DMI_MATCH(DMI_PRODUCT_NAME, "CF-52CCABVBG"),
526 },
527 },
508 /* 528 /*
509 * Disable OSI(Linux) warnings on all "Samsung Electronics" 529 * Disable OSI(Linux) warnings on all "Samsung Electronics"
510 * 530 *
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 27ccd68b8f46..a14501c98f40 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -343,7 +343,7 @@ struct acpi_table_header *acpi_find_dsdt_initrd(void)
343 struct kstat stat; 343 struct kstat stat;
344 char *ramfs_dsdt_name = "/DSDT.aml"; 344 char *ramfs_dsdt_name = "/DSDT.aml";
345 345
346 printk(KERN_INFO PREFIX "Checking initramfs for custom DSDT"); 346 printk(KERN_INFO PREFIX "Checking initramfs for custom DSDT\n");
347 347
348 /* 348 /*
349 * Never do this at home, only the user-space is allowed to open a file. 349 * Never do this at home, only the user-space is allowed to open a file.
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index f32010bee4d5..b477a4be8a69 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -50,6 +50,10 @@ ACPI_MODULE_NAME("processor_perflib");
50 50
51static DEFINE_MUTEX(performance_mutex); 51static DEFINE_MUTEX(performance_mutex);
52 52
53/* Use cpufreq debug layer for _PPC changes. */
54#define cpufreq_printk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_CORE, \
55 "cpufreq-core", msg)
56
53/* 57/*
54 * _PPC support is implemented as a CPUfreq policy notifier: 58 * _PPC support is implemented as a CPUfreq policy notifier:
55 * This means each time a CPUfreq driver registered also with 59 * This means each time a CPUfreq driver registered also with
@@ -131,6 +135,9 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
131 return -ENODEV; 135 return -ENODEV;
132 } 136 }
133 137
138 cpufreq_printk("CPU %d: _PPC is %d - frequency %s limited\n", pr->id,
139 (int)ppc, ppc ? "" : "not");
140
134 pr->performance_platform_limit = (int)ppc; 141 pr->performance_platform_limit = (int)ppc;
135 142
136 return 0; 143 return 0;
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 1941587a7aa2..c143a86c2ea6 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -106,9 +106,9 @@ config ACER_WMI
106 depends on X86 106 depends on X86
107 depends on EXPERIMENTAL 107 depends on EXPERIMENTAL
108 depends on ACPI 108 depends on ACPI
109 depends on ACPI_WMI
110 depends on LEDS_CLASS 109 depends on LEDS_CLASS
111 depends on BACKLIGHT_CLASS_DEVICE 110 depends on BACKLIGHT_CLASS_DEVICE
111 select ACPI_WMI
112 ---help--- 112 ---help---
113 This is a driver for newer Acer (and Wistron) laptops. It adds 113 This is a driver for newer Acer (and Wistron) laptops. It adds
114 wireless radio and bluetooth control, and on some laptops, 114 wireless radio and bluetooth control, and on some laptops,
@@ -155,7 +155,7 @@ config TC1100_WMI
155 tristate "HP Compaq TC1100 Tablet WMI Extras" 155 tristate "HP Compaq TC1100 Tablet WMI Extras"
156 depends on X86 && !X86_64 156 depends on X86 && !X86_64
157 depends on ACPI 157 depends on ACPI
158 depends on ACPI_WMI 158 select ACPI_WMI
159 ---help--- 159 ---help---
160 This is a driver for the WMI extensions (wireless and bluetooth power 160 This is a driver for the WMI extensions (wireless and bluetooth power
161 control) of the HP Compaq TC1100 tablet. 161 control) of the HP Compaq TC1100 tablet.
@@ -288,6 +288,7 @@ config ATMEL_SSC
288config INTEL_MENLOW 288config INTEL_MENLOW
289 tristate "Thermal Management driver for Intel menlow platform" 289 tristate "Thermal Management driver for Intel menlow platform"
290 depends on ACPI_THERMAL 290 depends on ACPI_THERMAL
291 depends on X86
291 ---help--- 292 ---help---
292 ACPI thermal management enhancement driver on 293 ACPI thermal management enhancement driver on
293 Intel Menlow platform. 294 Intel Menlow platform.
diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index 9b3f61200000..69f19f224875 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
@@ -9,7 +9,7 @@ menuconfig THERMAL
9 Generic Thermal Sysfs driver offers a generic mechanism for 9 Generic Thermal Sysfs driver offers a generic mechanism for
10 thermal management. Usually it's made up of one or more thermal 10 thermal management. Usually it's made up of one or more thermal
11 zone and cooling device. 11 zone and cooling device.
12 each thermal zone contains its own temperature, trip points, 12 Each thermal zone contains its own temperature, trip points,
13 cooling devices. 13 cooling devices.
14 All platforms with ACPI thermal support can use this driver. 14 All platforms with ACPI thermal support can use this driver.
15 If you want this support, you should say Y here 15 If you want this support, you should say Y here.
diff --git a/drivers/thermal/thermal.c b/drivers/thermal/thermal.c
index 3273e348fd14..e782b3e7fcdb 100644
--- a/drivers/thermal/thermal.c
+++ b/drivers/thermal/thermal.c
@@ -267,7 +267,7 @@ thermal_cooling_device_cur_state_store(struct device *dev,
267} 267}
268 268
269static struct device_attribute dev_attr_cdev_type = 269static struct device_attribute dev_attr_cdev_type =
270 __ATTR(type, 0444, thermal_cooling_device_type_show, NULL); 270__ATTR(type, 0444, thermal_cooling_device_type_show, NULL);
271static DEVICE_ATTR(max_state, 0444, 271static DEVICE_ATTR(max_state, 0444,
272 thermal_cooling_device_max_state_show, NULL); 272 thermal_cooling_device_max_state_show, NULL);
273static DEVICE_ATTR(cur_state, 0644, 273static DEVICE_ATTR(cur_state, 0644,
@@ -276,7 +276,7 @@ static DEVICE_ATTR(cur_state, 0644,
276 276
277static ssize_t 277static ssize_t
278thermal_cooling_device_trip_point_show(struct device *dev, 278thermal_cooling_device_trip_point_show(struct device *dev,
279 struct device_attribute *attr, char *buf) 279 struct device_attribute *attr, char *buf)
280{ 280{
281 struct thermal_cooling_device_instance *instance; 281 struct thermal_cooling_device_instance *instance;
282 282
@@ -293,11 +293,12 @@ thermal_cooling_device_trip_point_show(struct device *dev,
293 293
294/** 294/**
295 * thermal_zone_bind_cooling_device - bind a cooling device to a thermal zone 295 * thermal_zone_bind_cooling_device - bind a cooling device to a thermal zone
296 * this function is usually called in the thermal zone device .bind callback.
297 * @tz: thermal zone device 296 * @tz: thermal zone device
298 * @trip: indicates which trip point the cooling devices is 297 * @trip: indicates which trip point the cooling devices is
299 * associated with in this thermal zone. 298 * associated with in this thermal zone.
300 * @cdev: thermal cooling device 299 * @cdev: thermal cooling device
300 *
301 * This function is usually called in the thermal zone device .bind callback.
301 */ 302 */
302int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, 303int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
303 int trip, 304 int trip,
@@ -307,8 +308,7 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
307 struct thermal_cooling_device_instance *pos; 308 struct thermal_cooling_device_instance *pos;
308 int result; 309 int result;
309 310
310 if (trip >= tz->trips || 311 if (trip >= tz->trips || (trip < 0 && trip != THERMAL_TRIPS_NONE))
311 (trip < 0 && trip != THERMAL_TRIPS_NONE))
312 return -EINVAL; 312 return -EINVAL;
313 313
314 if (!tz || !cdev) 314 if (!tz || !cdev)
@@ -361,15 +361,17 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
361 kfree(dev); 361 kfree(dev);
362 return result; 362 return result;
363} 363}
364
364EXPORT_SYMBOL(thermal_zone_bind_cooling_device); 365EXPORT_SYMBOL(thermal_zone_bind_cooling_device);
365 366
366/** 367/**
367 * thermal_zone_unbind_cooling_device - unbind a cooling device from a thermal zone 368 * thermal_zone_unbind_cooling_device - unbind a cooling device from a thermal zone
368 * this function is usually called in the thermal zone device .unbind callback.
369 * @tz: thermal zone device 369 * @tz: thermal zone device
370 * @trip: indicates which trip point the cooling devices is 370 * @trip: indicates which trip point the cooling devices is
371 * associated with in this thermal zone. 371 * associated with in this thermal zone.
372 * @cdev: thermal cooling device 372 * @cdev: thermal cooling device
373 *
374 * This function is usually called in the thermal zone device .unbind callback.
373 */ 375 */
374int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz, 376int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz,
375 int trip, 377 int trip,
@@ -379,8 +381,7 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz,
379 381
380 mutex_lock(&tz->lock); 382 mutex_lock(&tz->lock);
381 list_for_each_entry_safe(pos, next, &tz->cooling_devices, node) { 383 list_for_each_entry_safe(pos, next, &tz->cooling_devices, node) {
382 if (pos->tz == tz && pos->trip == trip 384 if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) {
383 && pos->cdev == cdev) {
384 list_del(&pos->node); 385 list_del(&pos->node);
385 mutex_unlock(&tz->lock); 386 mutex_unlock(&tz->lock);
386 goto unbind; 387 goto unbind;
@@ -397,6 +398,7 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz,
397 kfree(pos); 398 kfree(pos);
398 return 0; 399 return 0;
399} 400}
401
400EXPORT_SYMBOL(thermal_zone_unbind_cooling_device); 402EXPORT_SYMBOL(thermal_zone_unbind_cooling_device);
401 403
402static void thermal_release(struct device *dev) 404static void thermal_release(struct device *dev)
@@ -425,7 +427,10 @@ static struct class thermal_class = {
425 * @ops: standard thermal cooling devices callbacks. 427 * @ops: standard thermal cooling devices callbacks.
426 */ 428 */
427struct thermal_cooling_device *thermal_cooling_device_register(char *type, 429struct thermal_cooling_device *thermal_cooling_device_register(char *type,
428 void *devdata, struct thermal_cooling_device_ops *ops) 430 void *devdata,
431 struct
432 thermal_cooling_device_ops
433 *ops)
429{ 434{
430 struct thermal_cooling_device *cdev; 435 struct thermal_cooling_device *cdev;
431 struct thermal_zone_device *pos; 436 struct thermal_zone_device *pos;
@@ -435,7 +440,7 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *type,
435 return NULL; 440 return NULL;
436 441
437 if (!ops || !ops->get_max_state || !ops->get_cur_state || 442 if (!ops || !ops->get_max_state || !ops->get_cur_state ||
438 !ops->set_cur_state) 443 !ops->set_cur_state)
439 return NULL; 444 return NULL;
440 445
441 cdev = kzalloc(sizeof(struct thermal_cooling_device), GFP_KERNEL); 446 cdev = kzalloc(sizeof(struct thermal_cooling_device), GFP_KERNEL);
@@ -462,8 +467,7 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *type,
462 467
463 /* sys I/F */ 468 /* sys I/F */
464 if (type) { 469 if (type) {
465 result = device_create_file(&cdev->device, 470 result = device_create_file(&cdev->device, &dev_attr_cdev_type);
466 &dev_attr_cdev_type);
467 if (result) 471 if (result)
468 goto unregister; 472 goto unregister;
469 } 473 }
@@ -496,11 +500,11 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *type,
496 device_unregister(&cdev->device); 500 device_unregister(&cdev->device);
497 return NULL; 501 return NULL;
498} 502}
503
499EXPORT_SYMBOL(thermal_cooling_device_register); 504EXPORT_SYMBOL(thermal_cooling_device_register);
500 505
501/** 506/**
502 * thermal_cooling_device_unregister - removes the registered thermal cooling device 507 * thermal_cooling_device_unregister - removes the registered thermal cooling device
503 *
504 * @cdev: the thermal cooling device to remove. 508 * @cdev: the thermal cooling device to remove.
505 * 509 *
506 * thermal_cooling_device_unregister() must be called when the device is no 510 * thermal_cooling_device_unregister() must be called when the device is no
@@ -533,8 +537,7 @@ void thermal_cooling_device_unregister(struct
533 } 537 }
534 mutex_unlock(&thermal_list_lock); 538 mutex_unlock(&thermal_list_lock);
535 if (cdev->type[0]) 539 if (cdev->type[0])
536 device_remove_file(&cdev->device, 540 device_remove_file(&cdev->device, &dev_attr_cdev_type);
537 &dev_attr_cdev_type);
538 device_remove_file(&cdev->device, &dev_attr_max_state); 541 device_remove_file(&cdev->device, &dev_attr_max_state);
539 device_remove_file(&cdev->device, &dev_attr_cur_state); 542 device_remove_file(&cdev->device, &dev_attr_cur_state);
540 543
@@ -542,6 +545,7 @@ void thermal_cooling_device_unregister(struct
542 device_unregister(&cdev->device); 545 device_unregister(&cdev->device);
543 return; 546 return;
544} 547}
548
545EXPORT_SYMBOL(thermal_cooling_device_unregister); 549EXPORT_SYMBOL(thermal_cooling_device_unregister);
546 550
547/** 551/**
@@ -555,8 +559,10 @@ EXPORT_SYMBOL(thermal_cooling_device_unregister);
555 * longer needed. 559 * longer needed.
556 */ 560 */
557struct thermal_zone_device *thermal_zone_device_register(char *type, 561struct thermal_zone_device *thermal_zone_device_register(char *type,
558 int trips, void *devdata, 562 int trips,
559 struct thermal_zone_device_ops *ops) 563 void *devdata, struct
564 thermal_zone_device_ops
565 *ops)
560{ 566{
561 struct thermal_zone_device *tz; 567 struct thermal_zone_device *tz;
562 struct thermal_cooling_device *pos; 568 struct thermal_cooling_device *pos;
@@ -625,9 +631,9 @@ struct thermal_zone_device *thermal_zone_device_register(char *type,
625 list_add_tail(&tz->node, &thermal_tz_list); 631 list_add_tail(&tz->node, &thermal_tz_list);
626 if (ops->bind) 632 if (ops->bind)
627 list_for_each_entry(pos, &thermal_cdev_list, node) { 633 list_for_each_entry(pos, &thermal_cdev_list, node) {
628 result = ops->bind(tz, pos); 634 result = ops->bind(tz, pos);
629 if (result) 635 if (result)
630 break; 636 break;
631 } 637 }
632 mutex_unlock(&thermal_list_lock); 638 mutex_unlock(&thermal_list_lock);
633 639
@@ -639,11 +645,11 @@ struct thermal_zone_device *thermal_zone_device_register(char *type,
639 device_unregister(&tz->device); 645 device_unregister(&tz->device);
640 return NULL; 646 return NULL;
641} 647}
648
642EXPORT_SYMBOL(thermal_zone_device_register); 649EXPORT_SYMBOL(thermal_zone_device_register);
643 650
644/** 651/**
645 * thermal_device_unregister - removes the registered thermal zone device 652 * thermal_device_unregister - removes the registered thermal zone device
646 *
647 * @tz: the thermal zone device to remove 653 * @tz: the thermal zone device to remove
648 */ 654 */
649void thermal_zone_device_unregister(struct thermal_zone_device *tz) 655void thermal_zone_device_unregister(struct thermal_zone_device *tz)
@@ -685,6 +691,7 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz)
685 device_unregister(&tz->device); 691 device_unregister(&tz->device);
686 return; 692 return;
687} 693}
694
688EXPORT_SYMBOL(thermal_zone_device_unregister); 695EXPORT_SYMBOL(thermal_zone_device_unregister);
689 696
690static int __init thermal_init(void) 697static int __init thermal_init(void)