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>
This commit is contained in:
@@ -93,11 +93,13 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
|
||||
*/
|
||||
u8 acpi_ev_valid_gpe_event(struct acpi_gpe_event_info *gpe_event_info);
|
||||
|
||||
acpi_status acpi_ev_walk_gpe_list(acpi_gpe_callback gpe_walk_callback);
|
||||
acpi_status
|
||||
acpi_ev_walk_gpe_list(acpi_gpe_callback gpe_walk_callback, void *context);
|
||||
|
||||
acpi_status
|
||||
acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
||||
struct acpi_gpe_block_info *gpe_block);
|
||||
struct acpi_gpe_block_info *gpe_block,
|
||||
void *context);
|
||||
|
||||
acpi_status
|
||||
acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device,
|
||||
|
@@ -326,6 +326,7 @@ ACPI_EXTERN struct acpi_fixed_event_handler
|
||||
ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head;
|
||||
ACPI_EXTERN struct acpi_gpe_block_info
|
||||
*acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS];
|
||||
ACPI_EXTERN u32 acpi_current_gpe_count;
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
|
@@ -94,13 +94,13 @@ acpi_hw_write_gpe_enable_reg(struct acpi_gpe_event_info *gpe_event_info);
|
||||
|
||||
acpi_status
|
||||
acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
||||
struct acpi_gpe_block_info *gpe_block);
|
||||
struct acpi_gpe_block_info *gpe_block, void *context);
|
||||
|
||||
acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info *gpe_event_info);
|
||||
|
||||
acpi_status
|
||||
acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
||||
struct acpi_gpe_block_info *gpe_block);
|
||||
struct acpi_gpe_block_info *gpe_block, void *context);
|
||||
|
||||
acpi_status
|
||||
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);
|
||||
|
||||
acpi_status
|
||||
acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
||||
struct acpi_gpe_block_info *gpe_block);
|
||||
struct acpi_gpe_block_info *gpe_block,
|
||||
void *context);
|
||||
|
||||
#ifdef ACPI_FUTURE_USAGE
|
||||
/*
|
||||
|
@@ -487,10 +487,15 @@ struct acpi_gpe_walk_info {
|
||||
struct acpi_gpe_block_info *gpe_block;
|
||||
};
|
||||
|
||||
typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info *
|
||||
gpe_xrupt_info,
|
||||
struct acpi_gpe_block_info *
|
||||
gpe_block);
|
||||
struct acpi_gpe_device_info {
|
||||
u32 index;
|
||||
u32 next_block_base_index;
|
||||
acpi_status status;
|
||||
struct acpi_namespace_node *gpe_device;
|
||||
};
|
||||
|
||||
typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
||||
struct acpi_gpe_block_info *gpe_block, void *context);
|
||||
|
||||
/* Information about each particular fixed event */
|
||||
|
||||
|
@@ -265,6 +265,8 @@ acpi_get_gpe_status(acpi_handle gpe_device,
|
||||
u32 gpe_number,
|
||||
u32 flags, acpi_event_status * event_status);
|
||||
|
||||
acpi_status acpi_get_gpe_device(u32 gpe_index, acpi_handle *gpe_device);
|
||||
|
||||
acpi_status
|
||||
acpi_install_gpe_block(acpi_handle gpe_device,
|
||||
struct acpi_generic_address *gpe_block_address,
|
||||
|
Reference in New Issue
Block a user