blob: d989b8e786cc9839417998e545776df1c769c8e8 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001
2/******************************************************************************
3 *
4 * Module Name: hwgpe - Low level GPE enable/disable/clear functions
5 *
6 *****************************************************************************/
7
8/*
Bob Moorea8357b02010-01-22 19:07:36 +08009 * Copyright (C) 2000 - 2010, Intel Corp.
Linus Torvalds1da177e2005-04-16 15:20:36 -070010 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions, and the following disclaimer,
17 * without modification.
18 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
19 * substantially similar to the "NO WARRANTY" disclaimer below
20 * ("Disclaimer") and any redistribution must be conditioned upon
21 * including a substantially similar Disclaimer requirement for further
22 * binary redistribution.
23 * 3. Neither the names of the above-listed copyright holders nor the names
24 * of any contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
26 *
27 * Alternatively, this software may be distributed under the terms of the
28 * GNU General Public License ("GPL") version 2 as published by the Free
29 * Software Foundation.
30 *
31 * NO WARRANTY
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
35 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
40 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
41 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42 * POSSIBILITY OF SUCH DAMAGES.
43 */
44
45#include <acpi/acpi.h>
Len Browne2f7a772009-01-09 00:30:03 -050046#include "accommon.h"
47#include "acevents.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070048
49#define _COMPONENT ACPI_HARDWARE
Len Brown4be44fc2005-08-05 00:44:28 -040050ACPI_MODULE_NAME("hwgpe")
Linus Torvalds1da177e2005-04-16 15:20:36 -070051
Robert Moore44f6c012005-04-18 22:49:35 -040052/* Local prototypes */
Robert Moore44f6c012005-04-18 22:49:35 -040053static acpi_status
Len Brown4be44fc2005-08-05 00:44:28 -040054acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
Bob Mooree97d6bf2008-12-30 09:45:17 +080055 struct acpi_gpe_block_info *gpe_block,
56 void *context);
Linus Torvalds1da177e2005-04-16 15:20:36 -070057
58/******************************************************************************
59 *
Rafael J. Wysockie4e9a732010-06-08 10:48:26 +020060 * FUNCTION: acpi_hw_gpe_register_bit
61 *
62 * PARAMETERS: gpe_event_info - Info block for the GPE
63 * gpe_register_info - Info block for the GPE register
64 *
65 * RETURN: Status
66 *
67 * DESCRIPTION: Compute GPE enable mask with one bit corresponding to the given
68 * GPE set.
69 *
70 ******************************************************************************/
71
72u32 acpi_hw_gpe_register_bit(struct acpi_gpe_event_info *gpe_event_info,
73 struct acpi_gpe_register_info *gpe_register_info)
74{
75 return (u32)1 << (gpe_event_info->gpe_number -
76 gpe_register_info->base_gpe_number);
77}
78
79/******************************************************************************
80 *
Bob Mooree38e8a02008-06-13 08:28:55 +080081 * FUNCTION: acpi_hw_low_disable_gpe
82 *
83 * PARAMETERS: gpe_event_info - Info block for the GPE to be disabled
84 *
85 * RETURN: Status
86 *
87 * DESCRIPTION: Disable a single GPE in the enable register.
88 *
89 ******************************************************************************/
90
91acpi_status acpi_hw_low_disable_gpe(struct acpi_gpe_event_info *gpe_event_info)
92{
93 struct acpi_gpe_register_info *gpe_register_info;
94 acpi_status status;
95 u32 enable_mask;
Rafael J. Wysockie4e9a732010-06-08 10:48:26 +020096 u32 register_bit;
Bob Mooree38e8a02008-06-13 08:28:55 +080097
98 /* Get the info block for the entire GPE register */
99
100 gpe_register_info = gpe_event_info->register_info;
101 if (!gpe_register_info) {
102 return (AE_NOT_EXIST);
103 }
104
105 /* Get current value of the enable register that contains this GPE */
106
Bob Moorec6b57742009-06-24 09:44:06 +0800107 status = acpi_hw_read(&enable_mask, &gpe_register_info->enable_address);
Bob Mooree38e8a02008-06-13 08:28:55 +0800108 if (ACPI_FAILURE(status)) {
109 return (status);
110 }
111
112 /* Clear just the bit that corresponds to this GPE */
113
Rafael J. Wysockie4e9a732010-06-08 10:48:26 +0200114 register_bit = acpi_hw_gpe_register_bit(gpe_event_info,
115 gpe_register_info);
116 ACPI_CLEAR_BIT(enable_mask, register_bit);
Bob Mooree38e8a02008-06-13 08:28:55 +0800117
118 /* Write the updated enable mask */
119
Bob Moorec6b57742009-06-24 09:44:06 +0800120 status = acpi_hw_write(enable_mask, &gpe_register_info->enable_address);
Bob Mooree38e8a02008-06-13 08:28:55 +0800121 return (status);
122}
123
124/******************************************************************************
125 *
Linus Torvalds1da177e2005-04-16 15:20:36 -0700126 * FUNCTION: acpi_hw_write_gpe_enable_reg
127 *
128 * PARAMETERS: gpe_event_info - Info block for the GPE to be enabled
129 *
130 * RETURN: Status
131 *
132 * DESCRIPTION: Write a GPE enable register. Note: The bit for this GPE must
133 * already be cleared or set in the parent register
134 * enable_for_run mask.
135 *
136 ******************************************************************************/
137
138acpi_status
Bob Mooree38e8a02008-06-13 08:28:55 +0800139acpi_hw_write_gpe_enable_reg(struct acpi_gpe_event_info * gpe_event_info)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700140{
Len Brown4be44fc2005-08-05 00:44:28 -0400141 struct acpi_gpe_register_info *gpe_register_info;
142 acpi_status status;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700143
Len Brown4be44fc2005-08-05 00:44:28 -0400144 ACPI_FUNCTION_ENTRY();
Linus Torvalds1da177e2005-04-16 15:20:36 -0700145
146 /* Get the info block for the entire GPE register */
147
148 gpe_register_info = gpe_event_info->register_info;
149 if (!gpe_register_info) {
150 return (AE_NOT_EXIST);
151 }
152
153 /* Write the entire GPE (runtime) enable register */
154
Bob Moorec6b57742009-06-24 09:44:06 +0800155 status = acpi_hw_write(gpe_register_info->enable_for_run,
156 &gpe_register_info->enable_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700157
158 return (status);
159}
160
Linus Torvalds1da177e2005-04-16 15:20:36 -0700161/******************************************************************************
162 *
163 * FUNCTION: acpi_hw_clear_gpe
164 *
165 * PARAMETERS: gpe_event_info - Info block for the GPE to be cleared
166 *
167 * RETURN: Status
168 *
169 * DESCRIPTION: Clear the status bit for a single GPE.
170 *
171 ******************************************************************************/
172
Len Brown4be44fc2005-08-05 00:44:28 -0400173acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info * gpe_event_info)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700174{
Rafael J. Wysockie4e9a732010-06-08 10:48:26 +0200175 struct acpi_gpe_register_info *gpe_register_info;
Len Brown4be44fc2005-08-05 00:44:28 -0400176 acpi_status status;
Rafael J. Wysockie4e9a732010-06-08 10:48:26 +0200177 u32 register_bit;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700178
Len Brown4be44fc2005-08-05 00:44:28 -0400179 ACPI_FUNCTION_ENTRY();
Linus Torvalds1da177e2005-04-16 15:20:36 -0700180
Rafael J. Wysockie4e9a732010-06-08 10:48:26 +0200181 /* Get the info block for the entire GPE register */
182
183 gpe_register_info = gpe_event_info->register_info;
184 if (!gpe_register_info) {
185 return (AE_NOT_EXIST);
186 }
187
188 register_bit = acpi_hw_gpe_register_bit(gpe_event_info,
189 gpe_register_info);
Alexey Starikovskiy69874162007-02-02 19:48:19 +0300190
Linus Torvalds1da177e2005-04-16 15:20:36 -0700191 /*
192 * Write a one to the appropriate bit in the status register to
193 * clear this GPE.
194 */
Bob Moorec6b57742009-06-24 09:44:06 +0800195 status = acpi_hw_write(register_bit,
Rafael J. Wysockie4e9a732010-06-08 10:48:26 +0200196 &gpe_register_info->status_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700197
198 return (status);
199}
200
Linus Torvalds1da177e2005-04-16 15:20:36 -0700201/******************************************************************************
202 *
203 * FUNCTION: acpi_hw_get_gpe_status
204 *
205 * PARAMETERS: gpe_event_info - Info block for the GPE to queried
206 * event_status - Where the GPE status is returned
207 *
208 * RETURN: Status
209 *
210 * DESCRIPTION: Return the status of a single GPE.
211 *
212 ******************************************************************************/
Robert Moore44f6c012005-04-18 22:49:35 -0400213
Linus Torvalds1da177e2005-04-16 15:20:36 -0700214acpi_status
Len Brown4be44fc2005-08-05 00:44:28 -0400215acpi_hw_get_gpe_status(struct acpi_gpe_event_info * gpe_event_info,
216 acpi_event_status * event_status)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700217{
Len Brown4be44fc2005-08-05 00:44:28 -0400218 u32 in_byte;
Rafael J. Wysockie4e9a732010-06-08 10:48:26 +0200219 u32 register_bit;
Len Brown4be44fc2005-08-05 00:44:28 -0400220 struct acpi_gpe_register_info *gpe_register_info;
221 acpi_status status;
222 acpi_event_status local_event_status = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700223
Len Brown4be44fc2005-08-05 00:44:28 -0400224 ACPI_FUNCTION_ENTRY();
Linus Torvalds1da177e2005-04-16 15:20:36 -0700225
226 if (!event_status) {
227 return (AE_BAD_PARAMETER);
228 }
229
230 /* Get the info block for the entire GPE register */
231
232 gpe_register_info = gpe_event_info->register_info;
233
234 /* Get the register bitmask for this GPE */
235
Rafael J. Wysockie4e9a732010-06-08 10:48:26 +0200236 register_bit = acpi_hw_gpe_register_bit(gpe_event_info,
237 gpe_register_info);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700238
239 /* GPE currently enabled? (enabled for runtime?) */
240
241 if (register_bit & gpe_register_info->enable_for_run) {
242 local_event_status |= ACPI_EVENT_FLAG_ENABLED;
243 }
244
245 /* GPE enabled for wake? */
246
247 if (register_bit & gpe_register_info->enable_for_wake) {
248 local_event_status |= ACPI_EVENT_FLAG_WAKE_ENABLED;
249 }
250
251 /* GPE currently active (status bit == 1)? */
252
Bob Moorec6b57742009-06-24 09:44:06 +0800253 status = acpi_hw_read(&in_byte, &gpe_register_info->status_address);
Len Brown4be44fc2005-08-05 00:44:28 -0400254 if (ACPI_FAILURE(status)) {
Bob Moore2147d3f2010-01-21 09:08:31 +0800255 return (status);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700256 }
257
258 if (register_bit & in_byte) {
259 local_event_status |= ACPI_EVENT_FLAG_SET;
260 }
261
262 /* Set return value */
263
264 (*event_status) = local_event_status;
Bob Moore2147d3f2010-01-21 09:08:31 +0800265 return (AE_OK);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700266}
Linus Torvalds1da177e2005-04-16 15:20:36 -0700267
268/******************************************************************************
269 *
270 * FUNCTION: acpi_hw_disable_gpe_block
271 *
272 * PARAMETERS: gpe_xrupt_info - GPE Interrupt info
273 * gpe_block - Gpe Block info
274 *
275 * RETURN: Status
276 *
Robert Moore44f6c012005-04-18 22:49:35 -0400277 * DESCRIPTION: Disable all GPEs within a single GPE block
Linus Torvalds1da177e2005-04-16 15:20:36 -0700278 *
279 ******************************************************************************/
280
281acpi_status
Bob Mooree97d6bf2008-12-30 09:45:17 +0800282acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
283 struct acpi_gpe_block_info *gpe_block, void *context)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700284{
Len Brown4be44fc2005-08-05 00:44:28 -0400285 u32 i;
286 acpi_status status;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700287
288 /* Examine each GPE Register within the block */
289
290 for (i = 0; i < gpe_block->register_count; i++) {
Bob Moore52fc0b02006-10-02 00:00:00 -0400291
Linus Torvalds1da177e2005-04-16 15:20:36 -0700292 /* Disable all GPEs in this register */
293
Bob Mooreecfbbc72008-12-31 02:55:32 +0800294 status =
Bob Moorec6b57742009-06-24 09:44:06 +0800295 acpi_hw_write(0x00,
296 &gpe_block->register_info[i].enable_address);
Len Brown4be44fc2005-08-05 00:44:28 -0400297 if (ACPI_FAILURE(status)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700298 return (status);
299 }
300 }
301
302 return (AE_OK);
303}
304
Linus Torvalds1da177e2005-04-16 15:20:36 -0700305/******************************************************************************
306 *
307 * FUNCTION: acpi_hw_clear_gpe_block
308 *
309 * PARAMETERS: gpe_xrupt_info - GPE Interrupt info
310 * gpe_block - Gpe Block info
311 *
312 * RETURN: Status
313 *
Robert Moore44f6c012005-04-18 22:49:35 -0400314 * DESCRIPTION: Clear status bits for all GPEs within a single GPE block
Linus Torvalds1da177e2005-04-16 15:20:36 -0700315 *
316 ******************************************************************************/
317
318acpi_status
Bob Mooree97d6bf2008-12-30 09:45:17 +0800319acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
320 struct acpi_gpe_block_info *gpe_block, void *context)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700321{
Len Brown4be44fc2005-08-05 00:44:28 -0400322 u32 i;
323 acpi_status status;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700324
325 /* Examine each GPE Register within the block */
326
327 for (i = 0; i < gpe_block->register_count; i++) {
Bob Moore52fc0b02006-10-02 00:00:00 -0400328
Linus Torvalds1da177e2005-04-16 15:20:36 -0700329 /* Clear status on all GPEs in this register */
330
Bob Mooreecfbbc72008-12-31 02:55:32 +0800331 status =
Bob Moorec6b57742009-06-24 09:44:06 +0800332 acpi_hw_write(0xFF,
333 &gpe_block->register_info[i].status_address);
Len Brown4be44fc2005-08-05 00:44:28 -0400334 if (ACPI_FAILURE(status)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700335 return (status);
336 }
337 }
338
339 return (AE_OK);
340}
341
Linus Torvalds1da177e2005-04-16 15:20:36 -0700342/******************************************************************************
343 *
344 * FUNCTION: acpi_hw_enable_runtime_gpe_block
345 *
346 * PARAMETERS: gpe_xrupt_info - GPE Interrupt info
347 * gpe_block - Gpe Block info
348 *
349 * RETURN: Status
350 *
Robert Moore44f6c012005-04-18 22:49:35 -0400351 * DESCRIPTION: Enable all "runtime" GPEs within a single GPE block. Includes
352 * combination wake/run GPEs.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700353 *
354 ******************************************************************************/
355
356acpi_status
Bob Mooree97d6bf2008-12-30 09:45:17 +0800357acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
358 struct acpi_gpe_block_info *gpe_block, void *context)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700359{
Len Brown4be44fc2005-08-05 00:44:28 -0400360 u32 i;
361 acpi_status status;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700362
363 /* NOTE: assumes that all GPEs are currently disabled */
364
365 /* Examine each GPE Register within the block */
366
367 for (i = 0; i < gpe_block->register_count; i++) {
368 if (!gpe_block->register_info[i].enable_for_run) {
369 continue;
370 }
371
372 /* Enable all "runtime" GPEs in this register */
373
Bob Moorec6b57742009-06-24 09:44:06 +0800374 status =
375 acpi_hw_write(gpe_block->register_info[i].enable_for_run,
376 &gpe_block->register_info[i].enable_address);
Len Brown4be44fc2005-08-05 00:44:28 -0400377 if (ACPI_FAILURE(status)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700378 return (status);
379 }
380 }
381
382 return (AE_OK);
383}
384
Linus Torvalds1da177e2005-04-16 15:20:36 -0700385/******************************************************************************
386 *
387 * FUNCTION: acpi_hw_enable_wakeup_gpe_block
388 *
389 * PARAMETERS: gpe_xrupt_info - GPE Interrupt info
390 * gpe_block - Gpe Block info
391 *
392 * RETURN: Status
393 *
Robert Moore44f6c012005-04-18 22:49:35 -0400394 * DESCRIPTION: Enable all "wake" GPEs within a single GPE block. Includes
395 * combination wake/run GPEs.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700396 *
397 ******************************************************************************/
398
Robert Moore44f6c012005-04-18 22:49:35 -0400399static acpi_status
Len Brown4be44fc2005-08-05 00:44:28 -0400400acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
Bob Mooree97d6bf2008-12-30 09:45:17 +0800401 struct acpi_gpe_block_info *gpe_block,
402 void *context)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700403{
Len Brown4be44fc2005-08-05 00:44:28 -0400404 u32 i;
405 acpi_status status;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700406
407 /* Examine each GPE Register within the block */
408
409 for (i = 0; i < gpe_block->register_count; i++) {
410 if (!gpe_block->register_info[i].enable_for_wake) {
411 continue;
412 }
413
414 /* Enable all "wake" GPEs in this register */
415
Bob Moorec6b57742009-06-24 09:44:06 +0800416 status =
417 acpi_hw_write(gpe_block->register_info[i].enable_for_wake,
418 &gpe_block->register_info[i].enable_address);
Len Brown4be44fc2005-08-05 00:44:28 -0400419 if (ACPI_FAILURE(status)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700420 return (status);
421 }
422 }
423
424 return (AE_OK);
425}
426
Linus Torvalds1da177e2005-04-16 15:20:36 -0700427/******************************************************************************
428 *
429 * FUNCTION: acpi_hw_disable_all_gpes
430 *
Robert Moore73459f72005-06-24 00:00:00 -0400431 * PARAMETERS: None
Linus Torvalds1da177e2005-04-16 15:20:36 -0700432 *
433 * RETURN: Status
434 *
Robert Moore44f6c012005-04-18 22:49:35 -0400435 * DESCRIPTION: Disable and clear all GPEs in all GPE blocks
Linus Torvalds1da177e2005-04-16 15:20:36 -0700436 *
437 ******************************************************************************/
438
Len Brown4be44fc2005-08-05 00:44:28 -0400439acpi_status acpi_hw_disable_all_gpes(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700440{
Len Brown4be44fc2005-08-05 00:44:28 -0400441 acpi_status status;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700442
Bob Mooreb229cf92006-04-21 17:15:00 -0400443 ACPI_FUNCTION_TRACE(hw_disable_all_gpes);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700444
Bob Mooree97d6bf2008-12-30 09:45:17 +0800445 status = acpi_ev_walk_gpe_list(acpi_hw_disable_gpe_block, NULL);
446 status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block, NULL);
Len Brown4be44fc2005-08-05 00:44:28 -0400447 return_ACPI_STATUS(status);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700448}
449
Linus Torvalds1da177e2005-04-16 15:20:36 -0700450/******************************************************************************
451 *
452 * FUNCTION: acpi_hw_enable_all_runtime_gpes
453 *
Robert Moore73459f72005-06-24 00:00:00 -0400454 * PARAMETERS: None
Linus Torvalds1da177e2005-04-16 15:20:36 -0700455 *
456 * RETURN: Status
457 *
Robert Moore44f6c012005-04-18 22:49:35 -0400458 * DESCRIPTION: Enable all "runtime" GPEs, in all GPE blocks
Linus Torvalds1da177e2005-04-16 15:20:36 -0700459 *
460 ******************************************************************************/
461
Len Brown4be44fc2005-08-05 00:44:28 -0400462acpi_status acpi_hw_enable_all_runtime_gpes(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700463{
Len Brown4be44fc2005-08-05 00:44:28 -0400464 acpi_status status;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700465
Bob Mooreb229cf92006-04-21 17:15:00 -0400466 ACPI_FUNCTION_TRACE(hw_enable_all_runtime_gpes);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700467
Bob Mooree97d6bf2008-12-30 09:45:17 +0800468 status = acpi_ev_walk_gpe_list(acpi_hw_enable_runtime_gpe_block, NULL);
Len Brown4be44fc2005-08-05 00:44:28 -0400469 return_ACPI_STATUS(status);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700470}
471
Linus Torvalds1da177e2005-04-16 15:20:36 -0700472/******************************************************************************
473 *
474 * FUNCTION: acpi_hw_enable_all_wakeup_gpes
475 *
Robert Moore73459f72005-06-24 00:00:00 -0400476 * PARAMETERS: None
Linus Torvalds1da177e2005-04-16 15:20:36 -0700477 *
478 * RETURN: Status
479 *
Robert Moore44f6c012005-04-18 22:49:35 -0400480 * DESCRIPTION: Enable all "wakeup" GPEs, in all GPE blocks
Linus Torvalds1da177e2005-04-16 15:20:36 -0700481 *
482 ******************************************************************************/
483
Len Brown4be44fc2005-08-05 00:44:28 -0400484acpi_status acpi_hw_enable_all_wakeup_gpes(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700485{
Len Brown4be44fc2005-08-05 00:44:28 -0400486 acpi_status status;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700487
Bob Mooreb229cf92006-04-21 17:15:00 -0400488 ACPI_FUNCTION_TRACE(hw_enable_all_wakeup_gpes);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700489
Bob Mooree97d6bf2008-12-30 09:45:17 +0800490 status = acpi_ev_walk_gpe_list(acpi_hw_enable_wakeup_gpe_block, NULL);
Len Brown4be44fc2005-08-05 00:44:28 -0400491 return_ACPI_STATUS(status);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700492}