aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2007-07-25 01:35:25 -0400
committerLen Brown <len.brown@intel.com>2007-07-25 01:35:25 -0400
commit1e1f3f24cdbc53e67acd7b2e37e6cf0cb11bd13c (patch)
treef2f8e838d36722d39d62eb7eec7a1b3ad29d0d5a /drivers/acpi
parentc30c620ee1cc351bcc149c4280e1166998df0064 (diff)
parente8b2fd01228f690c3e0cb3f14facfa8d93d4adae (diff)
Pull kconfig into release branch
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/Kconfig64
-rw-r--r--drivers/acpi/sleep/Makefile4
-rw-r--r--drivers/acpi/sleep/main.c2
-rw-r--r--drivers/acpi/sleep/poweroff.c2
-rw-r--r--drivers/acpi/sleep/proc.c20
-rw-r--r--drivers/acpi/sleep/wakeup.c2
6 files changed, 39 insertions, 55 deletions
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 408b45168aba..251344cb29ae 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -11,6 +11,9 @@ menuconfig ACPI
11 depends on PCI 11 depends on PCI
12 depends on PM 12 depends on PM
13 select PNP 13 select PNP
14 # for sleep
15 select HOTPLUG_CPU if X86 && SMP
16 select SUSPEND_SMP if X86 && SMP
14 default y 17 default y
15 ---help--- 18 ---help---
16 Advanced Configuration and Power Interface (ACPI) support for 19 Advanced Configuration and Power Interface (ACPI) support for
@@ -42,51 +45,26 @@ menuconfig ACPI
42 45
43if ACPI 46if ACPI
44 47
45config ACPI_SLEEP
46 bool "Sleep States"
47 depends on X86 && (!SMP || SUSPEND_SMP)
48 default y
49 ---help---
50 This option adds support for ACPI suspend states.
51
52 With this option, you will be able to put the system "to sleep".
53 Sleep states are low power states for the system and devices. All
54 of the system operating state is saved to either memory or disk
55 (depending on the state), to allow the system to resume operation
56 quickly at your request.
57
58 Although this option sounds really nifty, barely any of the device
59 drivers have been converted to the new driver model and hence few
60 have proper power management support.
61
62 This option is not recommended for anyone except those doing driver
63 power management development.
64
65config ACPI_SLEEP_PROC_FS
66 bool
67 depends on ACPI_SLEEP && PROC_FS
68 default y
69
70config ACPI_SLEEP_PROC_SLEEP
71 bool "/proc/acpi/sleep (deprecated)"
72 depends on ACPI_SLEEP_PROC_FS
73 default n
74 ---help---
75 Create /proc/acpi/sleep
76 Deprecated by /sys/power/state
77
78config ACPI_PROCFS 48config ACPI_PROCFS
79 bool "Procfs interface (deprecated)" 49 bool "Deprecated /proc/acpi files"
80 default y 50 depends on PROC_FS
81 ---help--- 51 ---help---
82 The Procfs interface for ACPI is made optional for backward compatibility. 52 For backwards compatibility, this option allows
83 As the same functions are duplicated in the sysfs interface 53 depricated /proc/acpi/ files to exist, even when
84 and this proc interface will be removed some time later, 54 they have been replaced by functions in /sys.
85 it's marked as deprecated. 55 The deprecated files (and their replacements) include:
86 ( /proc/acpi/debug_layer && debug_level are deprecated by 56
87 /sys/module/acpi/parameters/debug_layer && debug_level. 57 /proc/acpi/sleep (/sys/power/state)
88 /proc/acpi/info is deprecated by 58 /proc/acpi/info (/sys/modules/acpi/parameters/acpica_version)
89 /sys/module/acpi/parameters/acpica_version ) 59 /proc/acpi/dsdt (/sys/firmware/acpi/tables/DSDT)
60 /proc/acpi/fadt (/sys/firmware/acpi/tables/FACP)
61 /proc/acpi/debug_layer (/sys/module/acpi/parameters/debug_layer)
62 /proc/acpi/debug_level (/sys/module/acpi/parameters/debug_level)
63
64 This option has no effect on /proc/acpi/ files
65 and functions which do not yet exist in /sys.
66
67 Say N to delete /proc/acpi/ files that have moved to /sys/
90 68
91config ACPI_AC 69config ACPI_AC
92 tristate "AC Adapter" 70 tristate "AC Adapter"
diff --git a/drivers/acpi/sleep/Makefile b/drivers/acpi/sleep/Makefile
index d6c017709c85..01a993a1d086 100644
--- a/drivers/acpi/sleep/Makefile
+++ b/drivers/acpi/sleep/Makefile
@@ -1,5 +1,5 @@
1obj-y := poweroff.o wakeup.o 1obj-y := poweroff.o wakeup.o
2obj-$(CONFIG_ACPI_SLEEP) += main.o 2obj-y += main.o
3obj-$(CONFIG_ACPI_SLEEP_PROC_FS) += proc.o 3obj-$(CONFIG_X86) += proc.o
4 4
5EXTRA_CFLAGS += $(ACPI_CFLAGS) 5EXTRA_CFLAGS += $(ACPI_CFLAGS)
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
index 3279e72a94f8..54c2dfcf8651 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -136,10 +136,12 @@ static int acpi_pm_finish(suspend_state_t pm_state)
136 /* reset firmware waking vector */ 136 /* reset firmware waking vector */
137 acpi_set_firmware_waking_vector((acpi_physical_address) 0); 137 acpi_set_firmware_waking_vector((acpi_physical_address) 0);
138 138
139#ifdef CONFIG_X86
139 if (init_8259A_after_S1) { 140 if (init_8259A_after_S1) {
140 printk("Broken toshiba laptop -> kicking interrupts\n"); 141 printk("Broken toshiba laptop -> kicking interrupts\n");
141 init_8259A(0); 142 init_8259A(0);
142 } 143 }
144#endif
143 return 0; 145 return 0;
144} 146}
145 147
diff --git a/drivers/acpi/sleep/poweroff.c b/drivers/acpi/sleep/poweroff.c
index 39e40d56b034..b3f68ef0669e 100644
--- a/drivers/acpi/sleep/poweroff.c
+++ b/drivers/acpi/sleep/poweroff.c
@@ -18,7 +18,6 @@
18 18
19int acpi_sleep_prepare(u32 acpi_state) 19int acpi_sleep_prepare(u32 acpi_state)
20{ 20{
21#ifdef CONFIG_ACPI_SLEEP
22 /* do we have a wakeup address for S2 and S3? */ 21 /* do we have a wakeup address for S2 and S3? */
23 if (acpi_state == ACPI_STATE_S3) { 22 if (acpi_state == ACPI_STATE_S3) {
24 if (!acpi_wakeup_address) { 23 if (!acpi_wakeup_address) {
@@ -31,7 +30,6 @@ int acpi_sleep_prepare(u32 acpi_state)
31 } 30 }
32 ACPI_FLUSH_CPU_CACHE(); 31 ACPI_FLUSH_CPU_CACHE();
33 acpi_enable_wakeup_device_prep(acpi_state); 32 acpi_enable_wakeup_device_prep(acpi_state);
34#endif
35 acpi_gpe_sleep_prepare(acpi_state); 33 acpi_gpe_sleep_prepare(acpi_state);
36 acpi_enter_sleep_state_prep(acpi_state); 34 acpi_enter_sleep_state_prep(acpi_state);
37 return 0; 35 return 0;
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c
index 61f1822cc350..ed58e1168aed 100644
--- a/drivers/acpi/sleep/proc.c
+++ b/drivers/acpi/sleep/proc.c
@@ -14,8 +14,16 @@
14#include "sleep.h" 14#include "sleep.h"
15 15
16#define _COMPONENT ACPI_SYSTEM_COMPONENT 16#define _COMPONENT ACPI_SYSTEM_COMPONENT
17
18/*
19 * this file provides support for:
20 * /proc/acpi/sleep
21 * /proc/acpi/alarm
22 * /proc/acpi/wakeup
23 */
24
17ACPI_MODULE_NAME("sleep") 25ACPI_MODULE_NAME("sleep")
18#ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP 26#ifdef CONFIG_ACPI_PROCFS
19static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset) 27static int acpi_system_sleep_seq_show(struct seq_file *seq, void *offset)
20{ 28{
21 int i; 29 int i;
@@ -68,7 +76,7 @@ acpi_system_write_sleep(struct file *file,
68 Done: 76 Done:
69 return error ? error : count; 77 return error ? error : count;
70} 78}
71#endif /* CONFIG_ACPI_SLEEP_PROC_SLEEP */ 79#endif /* CONFIG_ACPI_PROCFS */
72 80
73#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) 81#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE)
74/* use /sys/class/rtc/rtcX/wakealarm instead; it's not ACPI-specific */ 82/* use /sys/class/rtc/rtcX/wakealarm instead; it's not ACPI-specific */
@@ -463,7 +471,7 @@ static const struct file_operations acpi_system_wakeup_device_fops = {
463 .release = single_release, 471 .release = single_release,
464}; 472};
465 473
466#ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP 474#ifdef CONFIG_ACPI_PROCFS
467static const struct file_operations acpi_system_sleep_fops = { 475static const struct file_operations acpi_system_sleep_fops = {
468 .open = acpi_system_sleep_open_fs, 476 .open = acpi_system_sleep_open_fs,
469 .read = seq_read, 477 .read = seq_read,
@@ -471,7 +479,7 @@ static const struct file_operations acpi_system_sleep_fops = {
471 .llseek = seq_lseek, 479 .llseek = seq_lseek,
472 .release = single_release, 480 .release = single_release,
473}; 481};
474#endif /* CONFIG_ACPI_SLEEP_PROC_SLEEP */ 482#endif /* CONFIG_ACPI_PROCFS */
475 483
476#ifdef HAVE_ACPI_LEGACY_ALARM 484#ifdef HAVE_ACPI_LEGACY_ALARM
477static const struct file_operations acpi_system_alarm_fops = { 485static const struct file_operations acpi_system_alarm_fops = {
@@ -498,14 +506,14 @@ static int __init acpi_sleep_proc_init(void)
498 if (acpi_disabled) 506 if (acpi_disabled)
499 return 0; 507 return 0;
500 508
501#ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP 509#ifdef CONFIG_ACPI_PROCFS
502 /* 'sleep' [R/W] */ 510 /* 'sleep' [R/W] */
503 entry = 511 entry =
504 create_proc_entry("sleep", S_IFREG | S_IRUGO | S_IWUSR, 512 create_proc_entry("sleep", S_IFREG | S_IRUGO | S_IWUSR,
505 acpi_root_dir); 513 acpi_root_dir);
506 if (entry) 514 if (entry)
507 entry->proc_fops = &acpi_system_sleep_fops; 515 entry->proc_fops = &acpi_system_sleep_fops;
508#endif 516#endif /* CONFIG_ACPI_PROCFS */
509 517
510#ifdef HAVE_ACPI_LEGACY_ALARM 518#ifdef HAVE_ACPI_LEGACY_ALARM
511 /* 'alarm' [R/W] */ 519 /* 'alarm' [R/W] */
diff --git a/drivers/acpi/sleep/wakeup.c b/drivers/acpi/sleep/wakeup.c
index fab8f2694f03..97c27ddb144d 100644
--- a/drivers/acpi/sleep/wakeup.c
+++ b/drivers/acpi/sleep/wakeup.c
@@ -17,7 +17,6 @@ ACPI_MODULE_NAME("wakeup_devices")
17extern struct list_head acpi_wakeup_device_list; 17extern struct list_head acpi_wakeup_device_list;
18extern spinlock_t acpi_device_lock; 18extern spinlock_t acpi_device_lock;
19 19
20#ifdef CONFIG_ACPI_SLEEP
21/** 20/**
22 * acpi_enable_wakeup_device_prep - prepare wakeup devices 21 * acpi_enable_wakeup_device_prep - prepare wakeup devices
23 * @sleep_state: ACPI state 22 * @sleep_state: ACPI state
@@ -180,7 +179,6 @@ static int __init acpi_wakeup_device_init(void)
180} 179}
181 180
182late_initcall(acpi_wakeup_device_init); 181late_initcall(acpi_wakeup_device_init);
183#endif
184 182
185/* 183/*
186 * Disable all wakeup GPEs before entering requested sleep state. 184 * Disable all wakeup GPEs before entering requested sleep state.