From b0b23e0ade6aa265d7278e06d50bc10ec81dd174 Mon Sep 17 00:00:00 2001 From: Len Brown Date: Thu, 7 Feb 2008 14:42:25 -0500 Subject: ACPI: add newline to printk Signed-off-by: Len Brown --- drivers/acpi/osl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') 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) struct kstat stat; char *ramfs_dsdt_name = "/DSDT.aml"; - printk(KERN_INFO PREFIX "Checking initramfs for custom DSDT"); + printk(KERN_INFO PREFIX "Checking initramfs for custom DSDT\n"); /* * Never do this at home, only the user-space is allowed to open a file. -- cgit v1.2.1 From 919158d17b42683a5c7368e1e77661c65a20a48a Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Wed, 31 Oct 2007 15:41:42 +0100 Subject: ACPI: cpufreq: Print _PPC changes via cpufreq debug layer enabled with CPU_FREQ_DEBUG Signed-off-by: Thomas Renninger Signed-off-by: Len Brown --- drivers/acpi/processor_perflib.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers') 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"); static DEFINE_MUTEX(performance_mutex); +/* Use cpufreq debug layer for _PPC changes. */ +#define cpufreq_printk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_CORE, \ + "cpufreq-core", msg) + /* * _PPC support is implemented as a CPUfreq policy notifier: * 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) return -ENODEV; } + cpufreq_printk("CPU %d: _PPC is %d - frequency %s limited\n", pr->id, + (int)ppc, ppc ? "" : "not"); + pr->performance_platform_limit = (int)ppc; return 0; -- cgit v1.2.1 From 9c2f7de8c0f979fc6354bf0d22c0cdcc29722bf6 Mon Sep 17 00:00:00 2001 From: Len Brown Date: Thu, 7 Feb 2008 16:18:24 -0500 Subject: ACPI: build WMI on X86 only Signed-off-by: Len Brown --- drivers/acpi/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 7ef172c2a1d6..65da19bd0bee 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -204,6 +204,7 @@ config ACPI_NUMA config ACPI_WMI tristate "WMI (EXPERIMENTAL)" + depends on X86 depends on EXPERIMENTAL help This driver adds support for the ACPI-WMI mapper device (PNP0C14) -- cgit v1.2.1 From 9f2eef25e044603527e121066284d22f51d853cc Mon Sep 17 00:00:00 2001 From: Len Brown Date: Thu, 7 Feb 2008 16:19:56 -0500 Subject: intel_menlo: build on X86 only Signed-off-by: Len Brown --- drivers/misc/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 78cd33861766..218c65a7d914 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -279,6 +279,7 @@ config ATMEL_SSC config INTEL_MENLOW tristate "Thermal Management driver for Intel menlow platform" depends on ACPI_THERMAL + depends on X86 ---help--- ACPI thermal management enhancement driver on Intel Menlow platform. -- cgit v1.2.1 From 543a956140e1f57331c0e528d2367106057aeca0 Mon Sep 17 00:00:00 2001 From: Len Brown Date: Thu, 7 Feb 2008 16:55:08 -0500 Subject: ACPI: thermal: syntax, spelling, kernel-doc Reviewed-by: Randy Dunlap Signed-off-by: Len Brown --- drivers/thermal/Kconfig | 4 ++-- drivers/thermal/thermal.c | 49 +++++++++++++++++++++++++++-------------------- 2 files changed, 30 insertions(+), 23 deletions(-) (limited to 'drivers') 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 Generic Thermal Sysfs driver offers a generic mechanism for thermal management. Usually it's made up of one or more thermal zone and cooling device. - each thermal zone contains its own temperature, trip points, + Each thermal zone contains its own temperature, trip points, cooling devices. All platforms with ACPI thermal support can use this driver. - If you want this support, you should say Y here + 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, } static struct device_attribute dev_attr_cdev_type = - __ATTR(type, 0444, thermal_cooling_device_type_show, NULL); +__ATTR(type, 0444, thermal_cooling_device_type_show, NULL); static DEVICE_ATTR(max_state, 0444, thermal_cooling_device_max_state_show, NULL); static DEVICE_ATTR(cur_state, 0644, @@ -276,7 +276,7 @@ static DEVICE_ATTR(cur_state, 0644, static ssize_t thermal_cooling_device_trip_point_show(struct device *dev, - struct device_attribute *attr, char *buf) + struct device_attribute *attr, char *buf) { struct thermal_cooling_device_instance *instance; @@ -293,11 +293,12 @@ thermal_cooling_device_trip_point_show(struct device *dev, /** * thermal_zone_bind_cooling_device - bind a cooling device to a thermal zone - * this function is usually called in the thermal zone device .bind callback. * @tz: thermal zone device * @trip: indicates which trip point the cooling devices is * associated with in this thermal zone. * @cdev: thermal cooling device + * + * This function is usually called in the thermal zone device .bind callback. */ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, int trip, @@ -307,8 +308,7 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, struct thermal_cooling_device_instance *pos; int result; - if (trip >= tz->trips || - (trip < 0 && trip != THERMAL_TRIPS_NONE)) + if (trip >= tz->trips || (trip < 0 && trip != THERMAL_TRIPS_NONE)) return -EINVAL; if (!tz || !cdev) @@ -361,15 +361,17 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, kfree(dev); return result; } + EXPORT_SYMBOL(thermal_zone_bind_cooling_device); /** * thermal_zone_unbind_cooling_device - unbind a cooling device from a thermal zone - * this function is usually called in the thermal zone device .unbind callback. * @tz: thermal zone device * @trip: indicates which trip point the cooling devices is * associated with in this thermal zone. * @cdev: thermal cooling device + * + * This function is usually called in the thermal zone device .unbind callback. */ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz, int trip, @@ -379,8 +381,7 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz, mutex_lock(&tz->lock); list_for_each_entry_safe(pos, next, &tz->cooling_devices, node) { - if (pos->tz == tz && pos->trip == trip - && pos->cdev == cdev) { + if (pos->tz == tz && pos->trip == trip && pos->cdev == cdev) { list_del(&pos->node); mutex_unlock(&tz->lock); goto unbind; @@ -397,6 +398,7 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz, kfree(pos); return 0; } + EXPORT_SYMBOL(thermal_zone_unbind_cooling_device); static void thermal_release(struct device *dev) @@ -425,7 +427,10 @@ static struct class thermal_class = { * @ops: standard thermal cooling devices callbacks. */ struct thermal_cooling_device *thermal_cooling_device_register(char *type, - void *devdata, struct thermal_cooling_device_ops *ops) + void *devdata, + struct + thermal_cooling_device_ops + *ops) { struct thermal_cooling_device *cdev; struct thermal_zone_device *pos; @@ -435,7 +440,7 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *type, return NULL; if (!ops || !ops->get_max_state || !ops->get_cur_state || - !ops->set_cur_state) + !ops->set_cur_state) return NULL; cdev = kzalloc(sizeof(struct thermal_cooling_device), GFP_KERNEL); @@ -462,8 +467,7 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *type, /* sys I/F */ if (type) { - result = device_create_file(&cdev->device, - &dev_attr_cdev_type); + result = device_create_file(&cdev->device, &dev_attr_cdev_type); if (result) goto unregister; } @@ -496,11 +500,11 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *type, device_unregister(&cdev->device); return NULL; } + EXPORT_SYMBOL(thermal_cooling_device_register); /** * thermal_cooling_device_unregister - removes the registered thermal cooling device - * * @cdev: the thermal cooling device to remove. * * thermal_cooling_device_unregister() must be called when the device is no @@ -533,8 +537,7 @@ void thermal_cooling_device_unregister(struct } mutex_unlock(&thermal_list_lock); if (cdev->type[0]) - device_remove_file(&cdev->device, - &dev_attr_cdev_type); + device_remove_file(&cdev->device, &dev_attr_cdev_type); device_remove_file(&cdev->device, &dev_attr_max_state); device_remove_file(&cdev->device, &dev_attr_cur_state); @@ -542,6 +545,7 @@ void thermal_cooling_device_unregister(struct device_unregister(&cdev->device); return; } + EXPORT_SYMBOL(thermal_cooling_device_unregister); /** @@ -555,8 +559,10 @@ EXPORT_SYMBOL(thermal_cooling_device_unregister); * longer needed. */ struct thermal_zone_device *thermal_zone_device_register(char *type, - int trips, void *devdata, - struct thermal_zone_device_ops *ops) + int trips, + void *devdata, struct + thermal_zone_device_ops + *ops) { struct thermal_zone_device *tz; struct thermal_cooling_device *pos; @@ -625,9 +631,9 @@ struct thermal_zone_device *thermal_zone_device_register(char *type, list_add_tail(&tz->node, &thermal_tz_list); if (ops->bind) list_for_each_entry(pos, &thermal_cdev_list, node) { - result = ops->bind(tz, pos); - if (result) - break; + result = ops->bind(tz, pos); + if (result) + break; } mutex_unlock(&thermal_list_lock); @@ -639,11 +645,11 @@ struct thermal_zone_device *thermal_zone_device_register(char *type, device_unregister(&tz->device); return NULL; } + EXPORT_SYMBOL(thermal_zone_device_register); /** * thermal_device_unregister - removes the registered thermal zone device - * * @tz: the thermal zone device to remove */ void thermal_zone_device_unregister(struct thermal_zone_device *tz) @@ -685,6 +691,7 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz) device_unregister(&tz->device); return; } + EXPORT_SYMBOL(thermal_zone_device_unregister); static int __init thermal_init(void) -- cgit v1.2.1 From 20b4514799ebcfb04b45537e90e421cb73fd0cc9 Mon Sep 17 00:00:00 2001 From: Carlos Corbacho Date: Fri, 8 Feb 2008 00:36:49 -0500 Subject: ACPI: WMI: Improve Kconfig description As Pavel Machek has pointed out, the Kconfig entry for WMI is pretty non-descriptive. Rewrite it so that it explains what ACPI-WMI is, and why anyone would want to enable it. Many thanks to Ray Lee for ideas on this. Signed-off-by: Carlos Corbacho CC: Pavel Machek CC: Ray Lee Signed-off-by: Len Brown --- drivers/acpi/Kconfig | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 65da19bd0bee..f688c214be0c 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -207,11 +207,22 @@ config ACPI_WMI depends on X86 depends on EXPERIMENTAL help - This driver adds support for the ACPI-WMI mapper device (PNP0C14) - found on some systems. + This driver adds support for the ACPI-WMI (Windows Management + Instrumentation) mapper device (PNP0C14) found on some systems. - NOTE: You will need another driver or userspace application on top of - this to actually use anything defined in the ACPI-WMI mapper. + ACPI-WMI is a proprietary extension to ACPI to expose parts of the + ACPI firmware to userspace - this is done through various vendor + defined methods and data blocks in a PNP0C14 device, which are then + made available for userspace to call. + + The implementation of this in Linux currently only exposes this to + other kernel space drivers. + + This driver is a required dependency to build the firmware specific + drivers needed on many machines, including Acer and HP laptops. + + It is safe to enable this driver even if your DSDT doesn't define + any ACPI-WMI devices. config ACPI_ASUS tristate "ASUS/Medion Laptop Extras" -- cgit v1.2.1 From 4a507d93fac78ecd37d18343c57c564f6a126f01 Mon Sep 17 00:00:00 2001 From: Len Brown Date: Fri, 8 Feb 2008 00:37:16 -0500 Subject: acer-wmi, tc1100-wmi: select ACPI_WMI It is safe for these Kconfig entries to use select because they select ACPI_WMI, which already has its dependencies satisfied. This makes Kconfig more user friendly, since the user selects the driver they want and the dependency is met for them. Otherwise, the user would have to find and enable ACPI_WMI to make enabling these drivers possible. Signed-off-by: Len Brown --- drivers/misc/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 218c65a7d914..e19343ec20cd 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -97,9 +97,9 @@ config ACER_WMI depends on X86 depends on EXPERIMENTAL depends on ACPI - depends on ACPI_WMI depends on LEDS_CLASS depends on BACKLIGHT_CLASS_DEVICE + select ACPI_WMI ---help--- This is a driver for newer Acer (and Wistron) laptops. It adds wireless radio and bluetooth control, and on some laptops, @@ -146,7 +146,7 @@ config TC1100_WMI tristate "HP Compaq TC1100 Tablet WMI Extras" depends on X86 && !X86_64 depends on ACPI - depends on ACPI_WMI + select ACPI_WMI ---help--- This is a driver for the WMI extensions (wireless and bluetooth power control) of the HP Compaq TC1100 tablet. -- cgit v1.2.1