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 /include | |
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 'include')
-rw-r--r-- | include/acpi/acevents.h | 6 | ||||
-rw-r--r-- | include/acpi/acglobal.h | 1 | ||||
-rw-r--r-- | include/acpi/achware.h | 7 | ||||
-rw-r--r-- | include/acpi/aclocal.h | 13 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 2 |
5 files changed, 20 insertions, 9 deletions
diff --git a/include/acpi/acevents.h b/include/acpi/acevents.h index d5d099bf349c..07e20135f01b 100644 --- a/include/acpi/acevents.h +++ b/include/acpi/acevents.h | |||
@@ -93,11 +93,13 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device, | |||
93 | */ | 93 | */ |
94 | u8 acpi_ev_valid_gpe_event(struct acpi_gpe_event_info *gpe_event_info); | 94 | u8 acpi_ev_valid_gpe_event(struct acpi_gpe_event_info *gpe_event_info); |
95 | 95 | ||
96 | acpi_status acpi_ev_walk_gpe_list(acpi_gpe_callback gpe_walk_callback); | 96 | acpi_status |
97 | acpi_ev_walk_gpe_list(acpi_gpe_callback gpe_walk_callback, void *context); | ||
97 | 98 | ||
98 | acpi_status | 99 | acpi_status |
99 | acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | 100 | acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info, |
100 | struct acpi_gpe_block_info *gpe_block); | 101 | struct acpi_gpe_block_info *gpe_block, |
102 | void *context); | ||
101 | 103 | ||
102 | acpi_status | 104 | acpi_status |
103 | acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, | 105 | acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, |
diff --git a/include/acpi/acglobal.h b/include/acpi/acglobal.h index 90cc82067c72..78f3c149f7ba 100644 --- a/include/acpi/acglobal.h +++ b/include/acpi/acglobal.h | |||
@@ -326,6 +326,7 @@ ACPI_EXTERN struct acpi_fixed_event_handler | |||
326 | ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head; | 326 | ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head; |
327 | ACPI_EXTERN struct acpi_gpe_block_info | 327 | ACPI_EXTERN struct acpi_gpe_block_info |
328 | *acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS]; | 328 | *acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS]; |
329 | ACPI_EXTERN u32 acpi_current_gpe_count; | ||
329 | 330 | ||
330 | /***************************************************************************** | 331 | /***************************************************************************** |
331 | * | 332 | * |
diff --git a/include/acpi/achware.h b/include/acpi/achware.h index 97a72b193276..960f8162ecfe 100644 --- a/include/acpi/achware.h +++ b/include/acpi/achware.h | |||
@@ -94,13 +94,13 @@ acpi_hw_write_gpe_enable_reg(struct acpi_gpe_event_info *gpe_event_info); | |||
94 | 94 | ||
95 | acpi_status | 95 | acpi_status |
96 | acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | 96 | acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, |
97 | struct acpi_gpe_block_info *gpe_block); | 97 | struct acpi_gpe_block_info *gpe_block, void *context); |
98 | 98 | ||
99 | acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info *gpe_event_info); | 99 | acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info *gpe_event_info); |
100 | 100 | ||
101 | acpi_status | 101 | acpi_status |
102 | acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | 102 | acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, |
103 | struct acpi_gpe_block_info *gpe_block); | 103 | struct acpi_gpe_block_info *gpe_block, void *context); |
104 | 104 | ||
105 | acpi_status | 105 | acpi_status |
106 | acpi_hw_get_gpe_status(struct acpi_gpe_event_info *gpe_event_info, | 106 | acpi_hw_get_gpe_status(struct acpi_gpe_event_info *gpe_event_info, |
@@ -114,7 +114,8 @@ acpi_status acpi_hw_enable_all_wakeup_gpes(void); | |||
114 | 114 | ||
115 | acpi_status | 115 | acpi_status |
116 | acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | 116 | acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, |
117 | struct acpi_gpe_block_info *gpe_block); | 117 | struct acpi_gpe_block_info *gpe_block, |
118 | void *context); | ||
118 | 119 | ||
119 | #ifdef ACPI_FUTURE_USAGE | 120 | #ifdef ACPI_FUTURE_USAGE |
120 | /* | 121 | /* |
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h index 0323fa9aa3e6..b43496080fdf 100644 --- a/include/acpi/aclocal.h +++ b/include/acpi/aclocal.h | |||
@@ -487,10 +487,15 @@ struct acpi_gpe_walk_info { | |||
487 | struct acpi_gpe_block_info *gpe_block; | 487 | struct acpi_gpe_block_info *gpe_block; |
488 | }; | 488 | }; |
489 | 489 | ||
490 | typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info * | 490 | struct acpi_gpe_device_info { |
491 | gpe_xrupt_info, | 491 | u32 index; |
492 | struct acpi_gpe_block_info * | 492 | u32 next_block_base_index; |
493 | gpe_block); | 493 | acpi_status status; |
494 | struct acpi_namespace_node *gpe_device; | ||
495 | }; | ||
496 | |||
497 | typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info *gpe_xrupt_info, | ||
498 | struct acpi_gpe_block_info *gpe_block, void *context); | ||
494 | 499 | ||
495 | /* Information about each particular fixed event */ | 500 | /* Information about each particular fixed event */ |
496 | 501 | ||
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index be0aa5eb0ba7..e09c23719e42 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -265,6 +265,8 @@ acpi_get_gpe_status(acpi_handle gpe_device, | |||
265 | u32 gpe_number, | 265 | u32 gpe_number, |
266 | u32 flags, acpi_event_status * event_status); | 266 | u32 flags, acpi_event_status * event_status); |
267 | 267 | ||
268 | acpi_status acpi_get_gpe_device(u32 gpe_index, acpi_handle *gpe_device); | ||
269 | |||
268 | acpi_status | 270 | acpi_status |
269 | acpi_install_gpe_block(acpi_handle gpe_device, | 271 | acpi_install_gpe_block(acpi_handle gpe_device, |
270 | struct acpi_generic_address *gpe_block_address, | 272 | struct acpi_generic_address *gpe_block_address, |