diff options
author | Bob Moore <robert.moore@intel.com> | 2008-12-29 20:45:17 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-12-31 01:10:24 -0500 |
commit | e97d6bf1a01b7403d98aea95731863aab2e84064 (patch) | |
tree | fd6dafb476e312424311425be96e07e5969f060f /drivers/acpi/hardware/hwgpe.c | |
parent | c1e3523ccbeca312e11557d2a75f90632a2fb5c7 (diff) |
ACPICA: New: acpi_get_gpe_device interface
This function maps an input GPE index to a GPE block device. Also
Added acpi_current_gpe_count to track the current number of GPEs
that are being managed by the ACPICA core (both FADT-based GPEs
and the GPEs contained in GPE block devices.)
Modify drivers/acpi/system.c to use these 2 new interfaces
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/hardware/hwgpe.c')
-rw-r--r-- | drivers/acpi/hardware/hwgpe.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/acpi/hardware/hwgpe.c b/drivers/acpi/hardware/hwgpe.c index 0b80db9d9197..5ab7cac6fbb9 100644 --- a/drivers/acpi/hardware/hwgpe.c +++ b/drivers/acpi/hardware/hwgpe.c | |||
@@ -51,7 +51,8 @@ ACPI_MODULE_NAME("hwgpe") | |||
51 | /* Local prototypes */ | 51 | /* Local prototypes */ |
52 | static acpi_status | 52 | static acpi_status |
53 | acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | 53 | acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, |
54 | struct acpi_gpe_block_info *gpe_block); | 54 | struct acpi_gpe_block_info *gpe_block, |
55 | void *context); | ||
55 | 56 | ||
56 | /****************************************************************************** | 57 | /****************************************************************************** |
57 | * | 58 | * |
@@ -260,8 +261,8 @@ acpi_hw_get_gpe_status(struct acpi_gpe_event_info * gpe_event_info, | |||
260 | ******************************************************************************/ | 261 | ******************************************************************************/ |
261 | 262 | ||
262 | acpi_status | 263 | acpi_status |
263 | acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info, | 264 | acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, |
264 | struct acpi_gpe_block_info * gpe_block) | 265 | struct acpi_gpe_block_info *gpe_block, void *context) |
265 | { | 266 | { |
266 | u32 i; | 267 | u32 i; |
267 | acpi_status status; | 268 | acpi_status status; |
@@ -297,8 +298,8 @@ acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info, | |||
297 | ******************************************************************************/ | 298 | ******************************************************************************/ |
298 | 299 | ||
299 | acpi_status | 300 | acpi_status |
300 | acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info, | 301 | acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, |
301 | struct acpi_gpe_block_info * gpe_block) | 302 | struct acpi_gpe_block_info *gpe_block, void *context) |
302 | { | 303 | { |
303 | u32 i; | 304 | u32 i; |
304 | acpi_status status; | 305 | acpi_status status; |
@@ -335,8 +336,8 @@ acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info, | |||
335 | ******************************************************************************/ | 336 | ******************************************************************************/ |
336 | 337 | ||
337 | acpi_status | 338 | acpi_status |
338 | acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info, | 339 | acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, |
339 | struct acpi_gpe_block_info * gpe_block) | 340 | struct acpi_gpe_block_info *gpe_block, void *context) |
340 | { | 341 | { |
341 | u32 i; | 342 | u32 i; |
342 | acpi_status status; | 343 | acpi_status status; |
@@ -382,7 +383,8 @@ acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info * gpe_xrupt_info, | |||
382 | 383 | ||
383 | static acpi_status | 384 | static acpi_status |
384 | acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | 385 | acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, |
385 | struct acpi_gpe_block_info *gpe_block) | 386 | struct acpi_gpe_block_info *gpe_block, |
387 | void *context) | ||
386 | { | 388 | { |
387 | u32 i; | 389 | u32 i; |
388 | acpi_status status; | 390 | acpi_status status; |
@@ -427,8 +429,8 @@ acpi_status acpi_hw_disable_all_gpes(void) | |||
427 | 429 | ||
428 | ACPI_FUNCTION_TRACE(hw_disable_all_gpes); | 430 | ACPI_FUNCTION_TRACE(hw_disable_all_gpes); |
429 | 431 | ||
430 | status = acpi_ev_walk_gpe_list(acpi_hw_disable_gpe_block); | 432 | status = acpi_ev_walk_gpe_list(acpi_hw_disable_gpe_block, NULL); |
431 | status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block); | 433 | status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block, NULL); |
432 | return_ACPI_STATUS(status); | 434 | return_ACPI_STATUS(status); |
433 | } | 435 | } |
434 | 436 | ||
@@ -450,7 +452,7 @@ acpi_status acpi_hw_enable_all_runtime_gpes(void) | |||
450 | 452 | ||
451 | ACPI_FUNCTION_TRACE(hw_enable_all_runtime_gpes); | 453 | ACPI_FUNCTION_TRACE(hw_enable_all_runtime_gpes); |
452 | 454 | ||
453 | status = acpi_ev_walk_gpe_list(acpi_hw_enable_runtime_gpe_block); | 455 | status = acpi_ev_walk_gpe_list(acpi_hw_enable_runtime_gpe_block, NULL); |
454 | return_ACPI_STATUS(status); | 456 | return_ACPI_STATUS(status); |
455 | } | 457 | } |
456 | 458 | ||
@@ -472,6 +474,6 @@ acpi_status acpi_hw_enable_all_wakeup_gpes(void) | |||
472 | 474 | ||
473 | ACPI_FUNCTION_TRACE(hw_enable_all_wakeup_gpes); | 475 | ACPI_FUNCTION_TRACE(hw_enable_all_wakeup_gpes); |
474 | 476 | ||
475 | status = acpi_ev_walk_gpe_list(acpi_hw_enable_wakeup_gpe_block); | 477 | status = acpi_ev_walk_gpe_list(acpi_hw_enable_wakeup_gpe_block, NULL); |
476 | return_ACPI_STATUS(status); | 478 | return_ACPI_STATUS(status); |
477 | } | 479 | } |