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:
  ACPI: Kconfig: remove CONFIG_ACPI_SLEEP from source
  ACPI: quiet ACPI Exceptions due to no _PTC or _TSS
  ACPI: Remove references to ACPI_STATE_S2 from acpi_pm_enter
  ACPI: Kconfig: always enable CONFIG_ACPI_SLEEP on X86
  ACPI: Kconfig: fold /proc/acpi/sleep under CONFIG_ACPI_PROCFS
  ACPI: Kconfig: CONFIG_ACPI_PROCFS now defaults to N
  ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI drivers
  ACPI: autoload modules - Create ACPI alias interface
  ACPI: autoload modules - ACPICA modifications
  ACPI: asus-laptop: Fix failure exits
  ACPI: fix oops due to typo in new throttling code
  ACPI: ignore _PSx method for hotplugable PCI devices
  ACPI: Use ACPI methods to select PCI device suspend state
  ACPI, PNP: hook ACPI D-state to PNP suspend/resume
  ACPI: Add acpi_pm_device_sleep_state helper routine
  ACPI: Implement the set_target() callback from pm_ops
  • Loading branch information
Linus Torvalds committed Jul 25, 2007
2 parents bc72450 + 323ef30 commit a4fb212
Show file tree
Hide file tree
Showing 59 changed files with 647 additions and 266 deletions.
2 changes: 1 addition & 1 deletion arch/i386/kernel/acpi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ obj-$(CONFIG_ACPI) += boot.o
ifneq ($(CONFIG_PCI),)
obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o
endif
obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o
obj-$(CONFIG_ACPI) += sleep.o wakeup.o

ifneq ($(CONFIG_ACPI_PROCESSOR),)
obj-y += cstate.o processor.o
Expand Down
2 changes: 1 addition & 1 deletion arch/i386/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ void __init setup_bootmem_allocator(void)
*/
reserve_bootmem(PAGE_SIZE, PAGE_SIZE);
#endif
#ifdef CONFIG_ACPI_SLEEP
#ifdef CONFIG_ACPI
/*
* Reserve low memory region for sleep support.
*/
Expand Down
2 changes: 1 addition & 1 deletion arch/i386/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ static void __init pagetable_init (void)
paravirt_pagetable_setup_done(pgd_base);
}

#if defined(CONFIG_SOFTWARE_SUSPEND) || defined(CONFIG_ACPI_SLEEP)
#if defined(CONFIG_SOFTWARE_SUSPEND) || defined(CONFIG_ACPI)
/*
* Swap suspend & friends need this for resume because things like the intel-agp
* driver might have split up a kernel 4MB mapping.
Expand Down
19 changes: 19 additions & 0 deletions arch/ia64/kernel/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ EXPORT_SYMBOL(pm_power_off);
unsigned int acpi_cpei_override;
unsigned int acpi_cpei_phys_cpuid;

unsigned long acpi_wakeup_address = 0;

const char __init *
acpi_get_sysname(void)
{
Expand Down Expand Up @@ -986,4 +988,21 @@ int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base)

EXPORT_SYMBOL(acpi_unregister_ioapic);

/*
* acpi_save_state_mem() - save kernel state
*
* TBD when when IA64 starts to support suspend...
*/
int acpi_save_state_mem(void) { return 0; }

/*
* acpi_restore_state()
*/
void acpi_restore_state_mem(void) {}

/*
* do_suspend_lowlevel()
*/
void do_suspend_lowlevel(void) {}

#endif /* CONFIG_ACPI */
2 changes: 1 addition & 1 deletion arch/x86_64/kernel/acpi/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
obj-y := boot.o
boot-y := ../../../i386/kernel/acpi/boot.o
obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o
obj-y += sleep.o wakeup.o

ifneq ($(CONFIG_ACPI_PROCESSOR),)
obj-y += processor.o
Expand Down
4 changes: 0 additions & 4 deletions arch/x86_64/kernel/acpi/sleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
Low-Level Sleep Support
-------------------------------------------------------------------------- */

#ifdef CONFIG_ACPI_SLEEP

/* address in low memory of the wakeup routine. */
unsigned long acpi_wakeup_address = 0;
unsigned long acpi_realmode_flags;
Expand Down Expand Up @@ -117,8 +115,6 @@ static int __init acpi_sleep_setup(char *str)

__setup("acpi_sleep=", acpi_sleep_setup);

#endif /*CONFIG_ACPI_SLEEP */

void acpi_pci_link_exit(void)
{
}
2 changes: 1 addition & 1 deletion arch/x86_64/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ ident_complete:
addq %rbp, trampoline_level4_pgt + 0(%rip)
addq %rbp, trampoline_level4_pgt + (511*8)(%rip)
#endif
#ifdef CONFIG_ACPI_SLEEP
#ifdef CONFIG_ACPI
addq %rbp, wakeup_level4_pgt + 0(%rip)
addq %rbp, wakeup_level4_pgt + (511*8)(%rip)
#endif
Expand Down
2 changes: 1 addition & 1 deletion arch/x86_64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ void __init setup_arch(char **cmdline_p)
reserve_bootmem_generic(SMP_TRAMPOLINE_BASE, 2*PAGE_SIZE);
#endif

#ifdef CONFIG_ACPI_SLEEP
#ifdef CONFIG_ACPI
/*
* Reserve low memory region for sleep support.
*/
Expand Down
64 changes: 21 additions & 43 deletions drivers/acpi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ menuconfig ACPI
depends on PCI
depends on PM
select PNP
# for sleep
select HOTPLUG_CPU if X86 && SMP
select SUSPEND_SMP if X86 && SMP
default y
---help---
Advanced Configuration and Power Interface (ACPI) support for
Expand Down Expand Up @@ -42,51 +45,26 @@ menuconfig ACPI

if ACPI

config ACPI_SLEEP
bool "Sleep States"
depends on X86 && (!SMP || SUSPEND_SMP)
default y
---help---
This option adds support for ACPI suspend states.

With this option, you will be able to put the system "to sleep".
Sleep states are low power states for the system and devices. All
of the system operating state is saved to either memory or disk
(depending on the state), to allow the system to resume operation
quickly at your request.

Although this option sounds really nifty, barely any of the device
drivers have been converted to the new driver model and hence few
have proper power management support.

This option is not recommended for anyone except those doing driver
power management development.

config ACPI_SLEEP_PROC_FS
bool
depends on ACPI_SLEEP && PROC_FS
default y

config ACPI_SLEEP_PROC_SLEEP
bool "/proc/acpi/sleep (deprecated)"
depends on ACPI_SLEEP_PROC_FS
default n
---help---
Create /proc/acpi/sleep
Deprecated by /sys/power/state

config ACPI_PROCFS
bool "Procfs interface (deprecated)"
default y
bool "Deprecated /proc/acpi files"
depends on PROC_FS
---help---
The Procfs interface for ACPI is made optional for backward compatibility.
As the same functions are duplicated in the sysfs interface
and this proc interface will be removed some time later,
it's marked as deprecated.
( /proc/acpi/debug_layer && debug_level are deprecated by
/sys/module/acpi/parameters/debug_layer && debug_level.
/proc/acpi/info is deprecated by
/sys/module/acpi/parameters/acpica_version )
For backwards compatibility, this option allows
depricated /proc/acpi/ files to exist, even when
they have been replaced by functions in /sys.
The deprecated files (and their replacements) include:

/proc/acpi/sleep (/sys/power/state)
/proc/acpi/info (/sys/modules/acpi/parameters/acpica_version)
/proc/acpi/dsdt (/sys/firmware/acpi/tables/DSDT)
/proc/acpi/fadt (/sys/firmware/acpi/tables/FACP)
/proc/acpi/debug_layer (/sys/module/acpi/parameters/debug_layer)
/proc/acpi/debug_level (/sys/module/acpi/parameters/debug_level)

This option has no effect on /proc/acpi/ files
and functions which do not yet exist in /sys.

Say N to delete /proc/acpi/ files that have moved to /sys/

config ACPI_AC
tristate "AC Adapter"
Expand Down
9 changes: 7 additions & 2 deletions drivers/acpi/ac.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

#define ACPI_AC_COMPONENT 0x00020000
#define ACPI_AC_CLASS "ac_adapter"
#define ACPI_AC_HID "ACPI0003"
#define ACPI_AC_DEVICE_NAME "AC Adapter"
#define ACPI_AC_FILE_STATE "state"
#define ACPI_AC_NOTIFY_STATUS 0x80
Expand All @@ -56,10 +55,16 @@ static int acpi_ac_add(struct acpi_device *device);
static int acpi_ac_remove(struct acpi_device *device, int type);
static int acpi_ac_open_fs(struct inode *inode, struct file *file);

const static struct acpi_device_id ac_device_ids[] = {
{"ACPI0003", 0},
{"", 0},
};
MODULE_DEVICE_TABLE(acpi, ac_device_ids);

static struct acpi_driver acpi_ac_driver = {
.name = "ac",
.class = ACPI_AC_CLASS,
.ids = ACPI_AC_HID,
.ids = ac_device_ids,
.ops = {
.add = acpi_ac_add,
.remove = acpi_ac_remove,
Expand Down
8 changes: 7 additions & 1 deletion drivers/acpi/acpi_memhotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,16 @@ static int acpi_memory_device_add(struct acpi_device *device);
static int acpi_memory_device_remove(struct acpi_device *device, int type);
static int acpi_memory_device_start(struct acpi_device *device);

static const struct acpi_device_id memory_device_ids[] = {
{ACPI_MEMORY_DEVICE_HID, 0},
{"", 0},
};
MODULE_DEVICE_TABLE(acpi, memory_device_ids);

static struct acpi_driver acpi_memory_device_driver = {
.name = "acpi_memhotplug",
.class = ACPI_MEMORY_DEVICE_CLASS,
.ids = ACPI_MEMORY_DEVICE_HID,
.ids = memory_device_ids,
.ops = {
.add = acpi_memory_device_add,
.remove = acpi_memory_device_remove,
Expand Down
11 changes: 8 additions & 3 deletions drivers/acpi/asus_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
#define ACPI_HOTK_NAME "Asus Laptop ACPI Extras Driver"
#define ACPI_HOTK_CLASS "hotkey"
#define ACPI_HOTK_DEVICE_NAME "Hotkey"
#define ACPI_HOTK_HID "ATK0100"

/*
* Some events we use, same for all Asus
Expand Down Expand Up @@ -426,14 +425,20 @@ static struct acpi_table_header *asus_info;
static struct asus_hotk *hotk;

/*
* The hotkey driver declaration
* The hotkey driver and autoloading declaration
*/
static int asus_hotk_add(struct acpi_device *device);
static int asus_hotk_remove(struct acpi_device *device, int type);
static const struct acpi_device_id asus_device_ids[] = {
{"ATK0100", 0},
{"", 0},
};
MODULE_DEVICE_TABLE(acpi, asus_device_ids);

static struct acpi_driver asus_hotk_driver = {
.name = "asus_acpi",
.class = ACPI_HOTK_CLASS,
.ids = ACPI_HOTK_HID,
.ids = asus_device_ids,
.ops = {
.add = asus_hotk_add,
.remove = asus_hotk_remove,
Expand Down
9 changes: 7 additions & 2 deletions drivers/acpi/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@

#define ACPI_BATTERY_COMPONENT 0x00040000
#define ACPI_BATTERY_CLASS "battery"
#define ACPI_BATTERY_HID "PNP0C0A"
#define ACPI_BATTERY_DEVICE_NAME "Battery"
#define ACPI_BATTERY_NOTIFY_STATUS 0x80
#define ACPI_BATTERY_NOTIFY_INFO 0x81
Expand Down Expand Up @@ -74,10 +73,16 @@ static int acpi_battery_add(struct acpi_device *device);
static int acpi_battery_remove(struct acpi_device *device, int type);
static int acpi_battery_resume(struct acpi_device *device);

static const struct acpi_device_id battery_device_ids[] = {
{"PNP0C0A", 0},
{"", 0},
};
MODULE_DEVICE_TABLE(acpi, battery_device_ids);

static struct acpi_driver acpi_battery_driver = {
.name = "battery",
.class = ACPI_BATTERY_CLASS,
.ids = ACPI_BATTERY_HID,
.ids = battery_device_ids,
.ops = {
.add = acpi_battery_add,
.resume = acpi_battery_resume,
Expand Down
12 changes: 11 additions & 1 deletion drivers/acpi/button.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ MODULE_AUTHOR("Paul Diefenbaugh");
MODULE_DESCRIPTION("ACPI Button Driver");
MODULE_LICENSE("GPL");

static const struct acpi_device_id button_device_ids[] = {
{ACPI_BUTTON_HID_LID, 0},
{ACPI_BUTTON_HID_SLEEP, 0},
{ACPI_BUTTON_HID_SLEEPF, 0},
{ACPI_BUTTON_HID_POWER, 0},
{ACPI_BUTTON_HID_POWERF, 0},
{"", 0},
};
MODULE_DEVICE_TABLE(acpi, button_device_ids);

static int acpi_button_add(struct acpi_device *device);
static int acpi_button_remove(struct acpi_device *device, int type);
static int acpi_button_info_open_fs(struct inode *inode, struct file *file);
Expand All @@ -74,7 +84,7 @@ static int acpi_button_state_open_fs(struct inode *inode, struct file *file);
static struct acpi_driver acpi_button_driver = {
.name = "button",
.class = ACPI_BUTTON_CLASS,
.ids = "button_power,button_sleep,PNP0C0D,PNP0C0C,PNP0C0E",
.ids = button_device_ids,
.ops = {
.add = acpi_button_add,
.remove = acpi_button_remove,
Expand Down
10 changes: 9 additions & 1 deletion drivers/acpi/container.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,18 @@ MODULE_LICENSE("GPL");
static int acpi_container_add(struct acpi_device *device);
static int acpi_container_remove(struct acpi_device *device, int type);

static const struct acpi_device_id container_device_ids[] = {
{"ACPI0004", 0},
{"PNP0A05", 0},
{"PNP0A06", 0},
{"", 0},
};
MODULE_DEVICE_TABLE(acpi, container_device_ids);

static struct acpi_driver acpi_container_driver = {
.name = "container",
.class = ACPI_CONTAINER_CLASS,
.ids = "ACPI0004,PNP0A05,PNP0A06",
.ids = container_device_ids,
.ops = {
.add = acpi_container_add,
.remove = acpi_container_remove,
Expand Down
8 changes: 6 additions & 2 deletions drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <acpi/actypes.h>

#define ACPI_EC_CLASS "embedded_controller"
#define ACPI_EC_HID "PNP0C09"
#define ACPI_EC_DEVICE_NAME "Embedded Controller"
#define ACPI_EC_FILE_INFO "info"

Expand Down Expand Up @@ -82,10 +81,15 @@ static int acpi_ec_start(struct acpi_device *device);
static int acpi_ec_stop(struct acpi_device *device, int type);
static int acpi_ec_add(struct acpi_device *device);

static const struct acpi_device_id ec_device_ids[] = {
{"PNP0C09", 0},
{"", 0},
};

static struct acpi_driver acpi_ec_driver = {
.name = "ec",
.class = ACPI_EC_CLASS,
.ids = ACPI_EC_HID,
.ids = ec_device_ids,
.ops = {
.add = acpi_ec_add,
.remove = acpi_ec_remove,
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/events/evrgnini.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ static u8 acpi_ev_match_pci_root_bridge(char *id)
static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node)
{
acpi_status status;
struct acpi_device_id hid;
struct acpica_device_id hid;
struct acpi_compatible_id_list *cid;
acpi_native_uint i;

Expand Down
8 changes: 7 additions & 1 deletion drivers/acpi/fan.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,16 @@ static int acpi_fan_remove(struct acpi_device *device, int type);
static int acpi_fan_suspend(struct acpi_device *device, pm_message_t state);
static int acpi_fan_resume(struct acpi_device *device);

static const struct acpi_device_id fan_device_ids[] = {
{"PNP0C0B", 0},
{"", 0},
};
MODULE_DEVICE_TABLE(acpi, fan_device_ids);

static struct acpi_driver acpi_fan_driver = {
.name = "fan",
.class = ACPI_FAN_CLASS,
.ids = "PNP0C0B",
.ids = fan_device_ids,
.ops = {
.add = acpi_fan_add,
.remove = acpi_fan_remove,
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/namespace/nsxfeval.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
acpi_status status;
struct acpi_namespace_node *node;
u32 flags;
struct acpi_device_id hid;
struct acpica_device_id hid;
struct acpi_compatible_id_list *cid;
acpi_native_uint i;

Expand Down
Loading

0 comments on commit a4fb212

Please sign in to comment.