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: (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 ...
This commit is contained in:
commit
71556b9800
17 changed files with 858 additions and 212 deletions
|
@ -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>
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
------------------------------------
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
-------------------------------------------------------------------------- */
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
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.
|
||||
*/
|
||||
if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &dummy)))
|
||||
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;
|
||||
|
|
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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)) {
|
||||
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
@ -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,
|
||||
|
@ -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,
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -245,7 +245,7 @@ struct acpi_table_fadt {
|
|||
#define ACPI_FADT_POWER_BUTTON (1<<4) /* 04: Power button is handled as a generic feature */
|
||||
#define ACPI_FADT_SLEEP_BUTTON (1<<5) /* 05: Sleep button is handled as a generic feature, or not present */
|
||||
#define ACPI_FADT_FIXED_RTC (1<<6) /* 06: RTC wakeup stat not in fixed register space */
|
||||
#define ACPI_FADT_S4_RTC_WAKE (1<<7) /* 07: RTC wakeup stat not possible from S4 */
|
||||
#define ACPI_FADT_S4_RTC_WAKE (1<<7) /* 07: RTC wakeup possible from S4 */
|
||||
#define ACPI_FADT_32BIT_TIMER (1<<8) /* 08: tmr_val is 32 bits 0=24-bits */
|
||||
#define ACPI_FADT_DOCKING_SUPPORTED (1<<9) /* 09: Docking supported */
|
||||
#define ACPI_FADT_RESET_REGISTER (1<<10) /* 10: System reset via the FADT RESET_REG supported */
|
||||
|
|
|
@ -123,7 +123,7 @@ static int collect_garbage_slots(void);
|
|||
static int __kprobes check_safety(void)
|
||||
{
|
||||
int ret = 0;
|
||||
#if defined(CONFIG_PREEMPT) && defined(CONFIG_PM)
|
||||
#if defined(CONFIG_PREEMPT) && defined(CONFIG_FREEZER)
|
||||
ret = freeze_processes();
|
||||
if (ret == 0) {
|
||||
struct task_struct *p, *q;
|
||||
|
|
|
@ -4,7 +4,8 @@ EXTRA_CFLAGS += -DDEBUG
|
|||
endif
|
||||
|
||||
obj-y := main.o
|
||||
obj-$(CONFIG_PM_SLEEP) += process.o console.o
|
||||
obj-$(CONFIG_PM_SLEEP) += console.o
|
||||
obj-$(CONFIG_FREEZER) += process.o
|
||||
obj-$(CONFIG_HIBERNATION) += swsusp.o disk.o snapshot.o swap.o user.o
|
||||
|
||||
obj-$(CONFIG_MAGIC_SYSRQ) += poweroff.o
|
||||
|
|
Loading…
Reference in a new issue