aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/hardware/hwsleep.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/hardware/hwsleep.c')
-rw-r--r--drivers/acpi/hardware/hwsleep.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c
index 89269272fd62..8bb43cae60c2 100644
--- a/drivers/acpi/hardware/hwsleep.c
+++ b/drivers/acpi/hardware/hwsleep.c
@@ -42,7 +42,6 @@
42 * POSSIBILITY OF SUCH DAMAGES. 42 * POSSIBILITY OF SUCH DAMAGES.
43 */ 43 */
44 44
45#include <linux/module.h>
46#include <acpi/acpi.h> 45#include <acpi/acpi.h>
47 46
48#define _COMPONENT ACPI_HARDWARE 47#define _COMPONENT ACPI_HARDWARE
@@ -64,7 +63,7 @@ acpi_status
64acpi_set_firmware_waking_vector(acpi_physical_address physical_address) 63acpi_set_firmware_waking_vector(acpi_physical_address physical_address)
65{ 64{
66 65
67 ACPI_FUNCTION_TRACE("acpi_set_firmware_waking_vector"); 66 ACPI_FUNCTION_TRACE(acpi_set_firmware_waking_vector);
68 67
69 /* Set the vector */ 68 /* Set the vector */
70 69
@@ -79,6 +78,8 @@ acpi_set_firmware_waking_vector(acpi_physical_address physical_address)
79 return_ACPI_STATUS(AE_OK); 78 return_ACPI_STATUS(AE_OK);
80} 79}
81 80
81ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector)
82
82/******************************************************************************* 83/*******************************************************************************
83 * 84 *
84 * FUNCTION: acpi_get_firmware_waking_vector 85 * FUNCTION: acpi_get_firmware_waking_vector
@@ -92,13 +93,12 @@ acpi_set_firmware_waking_vector(acpi_physical_address physical_address)
92 * DESCRIPTION: Access function for the firmware_waking_vector field in FACS 93 * DESCRIPTION: Access function for the firmware_waking_vector field in FACS
93 * 94 *
94 ******************************************************************************/ 95 ******************************************************************************/
95
96#ifdef ACPI_FUTURE_USAGE 96#ifdef ACPI_FUTURE_USAGE
97acpi_status 97acpi_status
98acpi_get_firmware_waking_vector(acpi_physical_address * physical_address) 98acpi_get_firmware_waking_vector(acpi_physical_address * physical_address)
99{ 99{
100 100
101 ACPI_FUNCTION_TRACE("acpi_get_firmware_waking_vector"); 101 ACPI_FUNCTION_TRACE(acpi_get_firmware_waking_vector);
102 102
103 if (!physical_address) { 103 if (!physical_address) {
104 return_ACPI_STATUS(AE_BAD_PARAMETER); 104 return_ACPI_STATUS(AE_BAD_PARAMETER);
@@ -118,6 +118,8 @@ acpi_get_firmware_waking_vector(acpi_physical_address * physical_address)
118 118
119 return_ACPI_STATUS(AE_OK); 119 return_ACPI_STATUS(AE_OK);
120} 120}
121
122ACPI_EXPORT_SYMBOL(acpi_get_firmware_waking_vector)
121#endif 123#endif
122 124
123/******************************************************************************* 125/*******************************************************************************
@@ -134,14 +136,13 @@ acpi_get_firmware_waking_vector(acpi_physical_address * physical_address)
134 * various OS-specific tasks between the two steps. 136 * various OS-specific tasks between the two steps.
135 * 137 *
136 ******************************************************************************/ 138 ******************************************************************************/
137
138acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) 139acpi_status acpi_enter_sleep_state_prep(u8 sleep_state)
139{ 140{
140 acpi_status status; 141 acpi_status status;
141 struct acpi_object_list arg_list; 142 struct acpi_object_list arg_list;
142 union acpi_object arg; 143 union acpi_object arg;
143 144
144 ACPI_FUNCTION_TRACE("acpi_enter_sleep_state_prep"); 145 ACPI_FUNCTION_TRACE(acpi_enter_sleep_state_prep);
145 146
146 /* 147 /*
147 * _PSW methods could be run here to enable wake-on keyboard, LAN, etc. 148 * _PSW methods could be run here to enable wake-on keyboard, LAN, etc.
@@ -206,6 +207,8 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state)
206 return_ACPI_STATUS(AE_OK); 207 return_ACPI_STATUS(AE_OK);
207} 208}
208 209
210ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep)
211
209/******************************************************************************* 212/*******************************************************************************
210 * 213 *
211 * FUNCTION: acpi_enter_sleep_state 214 * FUNCTION: acpi_enter_sleep_state
@@ -218,7 +221,6 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state)
218 * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED 221 * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
219 * 222 *
220 ******************************************************************************/ 223 ******************************************************************************/
221
222acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) 224acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
223{ 225{
224 u32 PM1Acontrol; 226 u32 PM1Acontrol;
@@ -228,7 +230,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
228 u32 in_value; 230 u32 in_value;
229 acpi_status status; 231 acpi_status status;
230 232
231 ACPI_FUNCTION_TRACE("acpi_enter_sleep_state"); 233 ACPI_FUNCTION_TRACE(acpi_enter_sleep_state);
232 234
233 if ((acpi_gbl_sleep_type_a > ACPI_SLEEP_TYPE_MAX) || 235 if ((acpi_gbl_sleep_type_a > ACPI_SLEEP_TYPE_MAX) ||
234 (acpi_gbl_sleep_type_b > ACPI_SLEEP_TYPE_MAX)) { 236 (acpi_gbl_sleep_type_b > ACPI_SLEEP_TYPE_MAX)) {
@@ -378,7 +380,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
378 return_ACPI_STATUS(AE_OK); 380 return_ACPI_STATUS(AE_OK);
379} 381}
380 382
381EXPORT_SYMBOL(acpi_enter_sleep_state); 383ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state)
382 384
383/******************************************************************************* 385/*******************************************************************************
384 * 386 *
@@ -392,13 +394,12 @@ EXPORT_SYMBOL(acpi_enter_sleep_state);
392 * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED 394 * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
393 * 395 *
394 ******************************************************************************/ 396 ******************************************************************************/
395
396acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void) 397acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)
397{ 398{
398 u32 in_value; 399 u32 in_value;
399 acpi_status status; 400 acpi_status status;
400 401
401 ACPI_FUNCTION_TRACE("acpi_enter_sleep_state_s4bios"); 402 ACPI_FUNCTION_TRACE(acpi_enter_sleep_state_s4bios);
402 403
403 status = 404 status =
404 acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1, ACPI_MTX_DO_NOT_LOCK); 405 acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1, ACPI_MTX_DO_NOT_LOCK);
@@ -443,7 +444,7 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)
443 return_ACPI_STATUS(AE_OK); 444 return_ACPI_STATUS(AE_OK);
444} 445}
445 446
446EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios); 447ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios)
447 448
448/******************************************************************************* 449/*******************************************************************************
449 * 450 *
@@ -457,7 +458,6 @@ EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios);
457 * Called with interrupts ENABLED. 458 * Called with interrupts ENABLED.
458 * 459 *
459 ******************************************************************************/ 460 ******************************************************************************/
460
461acpi_status acpi_leave_sleep_state(u8 sleep_state) 461acpi_status acpi_leave_sleep_state(u8 sleep_state)
462{ 462{
463 struct acpi_object_list arg_list; 463 struct acpi_object_list arg_list;
@@ -468,7 +468,7 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state)
468 u32 PM1Acontrol; 468 u32 PM1Acontrol;
469 u32 PM1Bcontrol; 469 u32 PM1Bcontrol;
470 470
471 ACPI_FUNCTION_TRACE("acpi_leave_sleep_state"); 471 ACPI_FUNCTION_TRACE(acpi_leave_sleep_state);
472 472
473 /* 473 /*
474 * Set SLP_TYPE and SLP_EN to state S0. 474 * Set SLP_TYPE and SLP_EN to state S0.
@@ -490,6 +490,7 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state)
490 ACPI_REGISTER_PM1_CONTROL, 490 ACPI_REGISTER_PM1_CONTROL,
491 &PM1Acontrol); 491 &PM1Acontrol);
492 if (ACPI_SUCCESS(status)) { 492 if (ACPI_SUCCESS(status)) {
493
493 /* Clear SLP_EN and SLP_TYP fields */ 494 /* Clear SLP_EN and SLP_TYP fields */
494 495
495 PM1Acontrol &= ~(sleep_type_reg_info->access_bit_mask | 496 PM1Acontrol &= ~(sleep_type_reg_info->access_bit_mask |
@@ -583,3 +584,5 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state)
583 584
584 return_ACPI_STATUS(status); 585 return_ACPI_STATUS(status);
585} 586}
587
588ACPI_EXPORT_SYMBOL(acpi_leave_sleep_state)