Skip to content

Commit

Permalink
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (23 commits)
  ACPI PCI hotplug: harden against panic regression
  ACPI: rename main.c to sleep.c
  dell-laptop: move to drivers/platform/x86/ from drivers/misc/
  eeepc-laptop: enable Bluetooth ACPI details
  ACPI: fix ACPI_FADT_S4_RTC_WAKE comment
  kprobes: check CONFIG_FREEZER instead of CONFIG_PM
  PM: Fix freezer compilation if PM_SLEEP is unset
  thermal fixup for broken BIOS which has invalid trip points.
  ACPI: EC: Don't trust ECDT tables from ASUS
  ACPI: EC: Limit workaround for ASUS notebooks even more
  ACPI: thinkpad-acpi: bump up version to 0.22
  ACPI: thinkpad-acpi: handle HKEY event 6030
  ACPI: thinkpad-acpi: clean-up fan subdriver quirk
  ACPI: thinkpad-acpi: start the event hunt season
  ACPI: thinkpad-acpi: handle HKEY thermal and battery alarms
  ACPI: thinkpad-acpi: clean up hotkey_notify()
  ACPI: thinkpad-acpi: use killable instead of interruptible mutexes
  ACPI: thinkpad-acpi: add UWB radio support
  ACPI: thinkpad-acpi: preserve radio state across shutdown
  ACPI: thinkpad-acpi: resume with radios disabled
  ...
  • Loading branch information
Linus Torvalds committed Jan 16, 2009
2 parents abcea85 + d45e085 commit 71556b9
Show file tree
Hide file tree
Showing 17 changed files with 858 additions and 212 deletions.
25 changes: 22 additions & 3 deletions Documentation/laptops/thinkpad-acpi.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ThinkPad ACPI Extras Driver

Version 0.21
May 29th, 2008
Version 0.22
November 23rd, 2008

Borislav Deianov <borislav@users.sf.net>
Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Expand All @@ -16,7 +16,8 @@ supported by the generic Linux ACPI drivers.
This driver used to be named ibm-acpi until kernel 2.6.21 and release
0.13-20070314. It used to be in the drivers/acpi tree, but it was
moved to the drivers/misc tree and renamed to thinkpad-acpi for kernel
2.6.22, and release 0.14.
2.6.22, and release 0.14. It was moved to drivers/platform/x86 for
kernel 2.6.29 and release 0.22.

The driver is named "thinkpad-acpi". In some places, like module
names, "thinkpad_acpi" is used because of userspace issues.
Expand Down Expand Up @@ -1412,6 +1413,24 @@ Sysfs notes:
rfkill controller switch "tpacpi_wwan_sw": refer to
Documentation/rfkill.txt for details.

EXPERIMENTAL: UWB
-----------------

This feature is marked EXPERIMENTAL because it has not been extensively
tested and validated in various ThinkPad models yet. The feature may not
work as expected. USE WITH CAUTION! To use this feature, you need to supply
the experimental=1 parameter when loading the module.

sysfs rfkill class: switch "tpacpi_uwb_sw"

This feature exports an rfkill controller for the UWB device, if one is
present and enabled in the BIOS.

Sysfs notes:

rfkill controller switch "tpacpi_uwb_sw": refer to
Documentation/rfkill.txt for details.

Multiple Commands, Module Parameters
------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ static int __kprobes pre_kprobes_handler(struct die_args *args)
return 1;

ss_probe:
#if !defined(CONFIG_PREEMPT) || defined(CONFIG_PM)
#if !defined(CONFIG_PREEMPT) || defined(CONFIG_FREEZER)
if (p->ainsn.inst_flag == INST_FLAG_BOOSTABLE && !p->post_handler) {
/* Boost up -- we can execute copied instructions directly */
ia64_psr(regs)->ri = p->ainsn.slot;
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
static void __kprobes setup_singlestep(struct kprobe *p, struct pt_regs *regs,
struct kprobe_ctlblk *kcb)
{
#if !defined(CONFIG_PREEMPT) || defined(CONFIG_PM)
#if !defined(CONFIG_PREEMPT) || defined(CONFIG_FREEZER)
if (p->ainsn.boostable == 1 && !p->post_handler) {
/* Boost up -- we can execute copied instructions directly */
reset_current_kprobe();
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ obj-y += osl.o utils.o reboot.o\

# sleep related files
obj-y += wakeup.o
obj-y += main.o
obj-y += sleep.o
obj-$(CONFIG_ACPI_SLEEP) += proc.o


Expand Down
73 changes: 30 additions & 43 deletions drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,31 +120,6 @@ static struct acpi_ec {
spinlock_t curr_lock;
} *boot_ec, *first_ec;

/*
* Some Asus system have exchanged ECDT data/command IO addresses.
*/
static int print_ecdt_error(const struct dmi_system_id *id)
{
printk(KERN_NOTICE PREFIX "%s detected - "
"ECDT has exchanged control/data I/O address\n",
id->ident);
return 0;
}

static struct dmi_system_id __cpuinitdata ec_dmi_table[] = {
{
print_ecdt_error, "Asus L4R", {
DMI_MATCH(DMI_BIOS_VERSION, "1008.006"),
DMI_MATCH(DMI_PRODUCT_NAME, "L4R"),
DMI_MATCH(DMI_BOARD_NAME, "L4R") }, NULL},
{
print_ecdt_error, "Asus M6R", {
DMI_MATCH(DMI_BIOS_VERSION, "0207"),
DMI_MATCH(DMI_PRODUCT_NAME, "M6R"),
DMI_MATCH(DMI_BOARD_NAME, "M6R") }, NULL},
{},
};

/* --------------------------------------------------------------------------
Transaction Management
-------------------------------------------------------------------------- */
Expand Down Expand Up @@ -983,8 +958,8 @@ static const struct acpi_device_id ec_device_ids[] = {
int __init acpi_ec_ecdt_probe(void)
{
acpi_status status;
struct acpi_ec *saved_ec = NULL;
struct acpi_table_ecdt *ecdt_ptr;
acpi_handle dummy;

boot_ec = make_acpi_ec();
if (!boot_ec)
Expand All @@ -998,21 +973,16 @@ int __init acpi_ec_ecdt_probe(void)
pr_info(PREFIX "EC description table is found, configuring boot EC\n");
boot_ec->command_addr = ecdt_ptr->control.address;
boot_ec->data_addr = ecdt_ptr->data.address;
if (dmi_check_system(ec_dmi_table)) {
/*
* If the board falls into ec_dmi_table, it means
* that ECDT table gives the incorrect command/status
* & data I/O address. Just fix it.
*/
boot_ec->data_addr = ecdt_ptr->control.address;
boot_ec->command_addr = ecdt_ptr->data.address;
}
boot_ec->gpe = ecdt_ptr->gpe;
boot_ec->handle = ACPI_ROOT_OBJECT;
acpi_get_handle(ACPI_ROOT_OBJECT, ecdt_ptr->id, &boot_ec->handle);
/* Add some basic check against completely broken table */
if (boot_ec->data_addr != boot_ec->command_addr)
/* Don't trust ECDT, which comes from ASUSTek */
if (!dmi_name_in_vendors("ASUS"))
goto install;
saved_ec = kmalloc(sizeof(struct acpi_ec), GFP_KERNEL);
if (!saved_ec)
return -ENOMEM;
memcpy(&saved_ec, boot_ec, sizeof(saved_ec));
/* fall through */
}
/* This workaround is needed only on some broken machines,
Expand All @@ -1023,12 +993,29 @@ int __init acpi_ec_ecdt_probe(void)
/* Check that acpi_get_devices actually find something */
if (ACPI_FAILURE(status) || !boot_ec->handle)
goto error;
/* We really need to limit this workaround, the only ASUS,
* which needs it, has fake EC._INI method, so use it as flag.
* Keep boot_ec struct as it will be needed soon.
*/
if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &dummy)))
return -ENODEV;
if (saved_ec) {
/* try to find good ECDT from ASUSTek */
if (saved_ec->command_addr != boot_ec->command_addr ||
saved_ec->data_addr != boot_ec->data_addr ||
saved_ec->gpe != boot_ec->gpe ||
saved_ec->handle != boot_ec->handle)
pr_info(PREFIX "ASUSTek keeps feeding us with broken "
"ECDT tables, which are very hard to workaround. "
"Trying to use DSDT EC info instead. Please send "
"output of acpidump to linux-acpi@vger.kernel.org\n");
kfree(saved_ec);
saved_ec = NULL;
} else {
/* We really need to limit this workaround, the only ASUS,
* which needs it, has fake EC._INI method, so use it as flag.
* Keep boot_ec struct as it will be needed soon.
*/
acpi_handle dummy;
if (!dmi_name_in_vendors("ASUS") ||
ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI",
&dummy)))
return -ENODEV;
}
install:
if (!ec_install_handlers(boot_ec)) {
first_ec = boot_ec;
Expand Down
File renamed without changes.
16 changes: 12 additions & 4 deletions drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,8 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
}

/* Passive (optional) */
if (flag & ACPI_TRIPS_PASSIVE) {
if (((flag & ACPI_TRIPS_PASSIVE) && tz->trips.passive.flags.valid) ||
(flag == ACPI_TRIPS_INIT)) {
valid = tz->trips.passive.flags.valid;
if (psv == -1) {
status = AE_SUPPORT;
Expand Down Expand Up @@ -462,8 +463,11 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
memset(&devices, 0, sizeof(struct acpi_handle_list));
status = acpi_evaluate_reference(tz->device->handle, "_PSL",
NULL, &devices);
if (ACPI_FAILURE(status))
if (ACPI_FAILURE(status)) {
printk(KERN_WARNING PREFIX
"Invalid passive threshold\n");
tz->trips.passive.flags.valid = 0;
}
else
tz->trips.passive.flags.valid = 1;

Expand All @@ -487,7 +491,8 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
if (act == -1)
break; /* disable all active trip points */

if (flag & ACPI_TRIPS_ACTIVE) {
if ((flag == ACPI_TRIPS_INIT) || ((flag & ACPI_TRIPS_ACTIVE) &&
tz->trips.active[i].flags.valid)) {
status = acpi_evaluate_integer(tz->device->handle,
name, NULL, &tmp);
if (ACPI_FAILURE(status)) {
Expand Down Expand Up @@ -521,8 +526,11 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
memset(&devices, 0, sizeof(struct acpi_handle_list));
status = acpi_evaluate_reference(tz->device->handle,
name, NULL, &devices);
if (ACPI_FAILURE(status))
if (ACPI_FAILURE(status)) {
printk(KERN_WARNING PREFIX
"Invalid active%d threshold\n", i);
tz->trips.active[i].flags.valid = 0;
}
else
tz->trips.active[i].flags.valid = 1;

Expand Down
1 change: 0 additions & 1 deletion drivers/misc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ obj-$(CONFIG_ATMEL_TCLIB) += atmel_tclib.o
obj-$(CONFIG_ICS932S401) += ics932s401.o
obj-$(CONFIG_LKDTM) += lkdtm.o
obj-$(CONFIG_TIFM_CORE) += tifm_core.o
obj-$(CONFIG_DELL_LAPTOP) += dell-laptop.o
obj-$(CONFIG_TIFM_7XX1) += tifm_7xx1.o
obj-$(CONFIG_PHANTOM) += phantom.o
obj-$(CONFIG_SGI_IOC4) += ioc4.o
Expand Down
2 changes: 2 additions & 0 deletions drivers/pci/hotplug/acpiphp_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ static int detect_ejectable_slots(struct pci_bus *pbus)
int found = acpi_pci_detect_ejectable(pbus);
if (!found) {
acpi_handle bridge_handle = acpi_pci_get_bridge_handle(pbus);
if (!bridge_handle)
return 0;
acpi_walk_namespace(ACPI_TYPE_DEVICE, bridge_handle, (u32)1,
is_pci_dock_device, (void *)&found, NULL);
}
Expand Down
23 changes: 23 additions & 0 deletions drivers/platform/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ config ASUS_LAPTOP

If you have an ACPI-compatible ASUS laptop, say Y or M here.

config DELL_LAPTOP
tristate "Dell Laptop Extras (EXPERIMENTAL)"
depends on X86
depends on DCDBAS
depends on EXPERIMENTAL
depends on BACKLIGHT_CLASS_DEVICE
depends on RFKILL
default n
---help---
This driver adds support for rfkill and backlight control to Dell
laptops.

config FUJITSU_LAPTOP
tristate "Fujitsu Laptop Extras"
depends on ACPI
Expand Down Expand Up @@ -192,6 +204,17 @@ config THINKPAD_ACPI

If you have an IBM or Lenovo ThinkPad laptop, say Y or M here.

config THINKPAD_ACPI_DEBUGFACILITIES
bool "Maintainer debug facilities"
depends on THINKPAD_ACPI
default n
---help---
Enables extra stuff in the thinkpad-acpi which is completely useless
for normal use. Read the driver source to find out what it does.

Say N here, unless you were told by a kernel maintainer to do
otherwise.

config THINKPAD_ACPI_DEBUG
bool "Verbose debug mode"
depends on THINKPAD_ACPI
Expand Down
1 change: 1 addition & 0 deletions drivers/platform/x86/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ obj-$(CONFIG_ASUS_LAPTOP) += asus-laptop.o
obj-$(CONFIG_EEEPC_LAPTOP) += eeepc-laptop.o
obj-$(CONFIG_MSI_LAPTOP) += msi-laptop.o
obj-$(CONFIG_COMPAL_LAPTOP) += compal-laptop.o
obj-$(CONFIG_DELL_LAPTOP) += dell-laptop.o
obj-$(CONFIG_ACER_WMI) += acer-wmi.o
obj-$(CONFIG_HP_WMI) += hp-wmi.o
obj-$(CONFIG_TC1100_WMI) += tc1100-wmi.o
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <linux/rfkill.h>
#include <linux/power_supply.h>
#include <linux/acpi.h>
#include "../firmware/dcdbas.h"
#include "../../firmware/dcdbas.h"

#define BRIGHTNESS_TOKEN 0x7d

Expand Down
4 changes: 2 additions & 2 deletions drivers/platform/x86/eeepc-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ enum {
};

static const char *cm_getv[] = {
"WLDG", NULL, NULL, NULL,
"WLDG", "BTHG", NULL, NULL,
"CAMG", NULL, NULL, NULL,
NULL, "PBLG", NULL, NULL,
"CFVG", NULL, NULL, NULL,
Expand All @@ -99,7 +99,7 @@ static const char *cm_getv[] = {
};

static const char *cm_setv[] = {
"WLDS", NULL, NULL, NULL,
"WLDS", "BTHS", NULL, NULL,
"CAMS", NULL, NULL, NULL,
"SDSP", "PBLS", "HDPS", NULL,
"CFVS", NULL, NULL, NULL,
Expand Down
Loading

0 comments on commit 71556b9

Please sign in to comment.