aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/evgpeutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/evgpeutil.c')
-rw-r--r--drivers/acpi/acpica/evgpeutil.c41
1 files changed, 40 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/evgpeutil.c b/drivers/acpi/acpica/evgpeutil.c
index 19a0e513ea48..80a81d0c4a80 100644
--- a/drivers/acpi/acpica/evgpeutil.c
+++ b/drivers/acpi/acpica/evgpeutil.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2010, Intel Corp. 8 * Copyright (C) 2000 - 2011, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -154,6 +154,45 @@ u8 acpi_ev_valid_gpe_event(struct acpi_gpe_event_info *gpe_event_info)
154 154
155/******************************************************************************* 155/*******************************************************************************
156 * 156 *
157 * FUNCTION: acpi_ev_get_gpe_device
158 *
159 * PARAMETERS: GPE_WALK_CALLBACK
160 *
161 * RETURN: Status
162 *
163 * DESCRIPTION: Matches the input GPE index (0-current_gpe_count) with a GPE
164 * block device. NULL if the GPE is one of the FADT-defined GPEs.
165 *
166 ******************************************************************************/
167
168acpi_status
169acpi_ev_get_gpe_device(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
170 struct acpi_gpe_block_info *gpe_block, void *context)
171{
172 struct acpi_gpe_device_info *info = context;
173
174 /* Increment Index by the number of GPEs in this block */
175
176 info->next_block_base_index += gpe_block->gpe_count;
177
178 if (info->index < info->next_block_base_index) {
179 /*
180 * The GPE index is within this block, get the node. Leave the node
181 * NULL for the FADT-defined GPEs
182 */
183 if ((gpe_block->node)->type == ACPI_TYPE_DEVICE) {
184 info->gpe_device = gpe_block->node;
185 }
186
187 info->status = AE_OK;
188 return (AE_CTRL_END);
189 }
190
191 return (AE_OK);
192}
193
194/*******************************************************************************
195 *
157 * FUNCTION: acpi_ev_get_gpe_xrupt_block 196 * FUNCTION: acpi_ev_get_gpe_xrupt_block
158 * 197 *
159 * PARAMETERS: interrupt_number - Interrupt for a GPE block 198 * PARAMETERS: interrupt_number - Interrupt for a GPE block