diff options
Diffstat (limited to 'drivers/acpi/acpica/evxfgpe.c')
-rw-r--r-- | drivers/acpi/acpica/evxfgpe.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi/acpica/evxfgpe.c index 17cfef721d00..d7a3b2775505 100644 --- a/drivers/acpi/acpica/evxfgpe.c +++ b/drivers/acpi/acpica/evxfgpe.c | |||
@@ -235,11 +235,13 @@ acpi_status acpi_set_gpe(acpi_handle gpe_device, u32 gpe_number, u8 action) | |||
235 | case ACPI_GPE_ENABLE: | 235 | case ACPI_GPE_ENABLE: |
236 | 236 | ||
237 | status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_ENABLE); | 237 | status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_ENABLE); |
238 | gpe_event_info->disable_for_dispatch = FALSE; | ||
238 | break; | 239 | break; |
239 | 240 | ||
240 | case ACPI_GPE_DISABLE: | 241 | case ACPI_GPE_DISABLE: |
241 | 242 | ||
242 | status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_DISABLE); | 243 | status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_DISABLE); |
244 | gpe_event_info->disable_for_dispatch = TRUE; | ||
243 | break; | 245 | break; |
244 | 246 | ||
245 | default: | 247 | default: |
@@ -257,6 +259,47 @@ ACPI_EXPORT_SYMBOL(acpi_set_gpe) | |||
257 | 259 | ||
258 | /******************************************************************************* | 260 | /******************************************************************************* |
259 | * | 261 | * |
262 | * FUNCTION: acpi_mask_gpe | ||
263 | * | ||
264 | * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 | ||
265 | * gpe_number - GPE level within the GPE block | ||
266 | * is_masked - Whether the GPE is masked or not | ||
267 | * | ||
268 | * RETURN: Status | ||
269 | * | ||
270 | * DESCRIPTION: Unconditionally mask/unmask the an individual GPE, ex., to | ||
271 | * prevent a GPE flooding. | ||
272 | * | ||
273 | ******************************************************************************/ | ||
274 | acpi_status acpi_mask_gpe(acpi_handle gpe_device, u32 gpe_number, u8 is_masked) | ||
275 | { | ||
276 | struct acpi_gpe_event_info *gpe_event_info; | ||
277 | acpi_status status; | ||
278 | acpi_cpu_flags flags; | ||
279 | |||
280 | ACPI_FUNCTION_TRACE(acpi_mask_gpe); | ||
281 | |||
282 | flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); | ||
283 | |||
284 | /* Ensure that we have a valid GPE number */ | ||
285 | |||
286 | gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number); | ||
287 | if (!gpe_event_info) { | ||
288 | status = AE_BAD_PARAMETER; | ||
289 | goto unlock_and_exit; | ||
290 | } | ||
291 | |||
292 | status = acpi_ev_mask_gpe(gpe_event_info, is_masked); | ||
293 | |||
294 | unlock_and_exit: | ||
295 | acpi_os_release_lock(acpi_gbl_gpe_lock, flags); | ||
296 | return_ACPI_STATUS(status); | ||
297 | } | ||
298 | |||
299 | ACPI_EXPORT_SYMBOL(acpi_mask_gpe) | ||
300 | |||
301 | /******************************************************************************* | ||
302 | * | ||
260 | * FUNCTION: acpi_mark_gpe_for_wake | 303 | * FUNCTION: acpi_mark_gpe_for_wake |
261 | * | 304 | * |
262 | * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 | 305 | * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 |