diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-09-29 20:25:42 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-09-30 15:04:47 -0400 |
commit | e0fa975d85b2ec300b3d69f08bc4933f79316651 (patch) | |
tree | a6db7c3de5d129fff7209ab5e211a150002e13d5 | |
parent | 5a0b8deeeb19906b24a48d0078aa6b64dc0b4dab (diff) |
ACPICA: Introduce acpi_enable_all_wakeup_gpes()
Add a routine for host OSes to enable all wakeup GPEs and disable
all of the non-wakeup ones at the same time.
It will be used for the handling of GPE wakeup from suspend-to-idle
in Linux.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/acpica/evxfgpe.c | 32 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 1 |
2 files changed, 33 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi/acpica/evxfgpe.c index 0cf159cc6e6d..56710a03c9b0 100644 --- a/drivers/acpi/acpica/evxfgpe.c +++ b/drivers/acpi/acpica/evxfgpe.c | |||
@@ -596,6 +596,38 @@ acpi_status acpi_enable_all_runtime_gpes(void) | |||
596 | 596 | ||
597 | ACPI_EXPORT_SYMBOL(acpi_enable_all_runtime_gpes) | 597 | ACPI_EXPORT_SYMBOL(acpi_enable_all_runtime_gpes) |
598 | 598 | ||
599 | /****************************************************************************** | ||
600 | * | ||
601 | * FUNCTION: acpi_enable_all_wakeup_gpes | ||
602 | * | ||
603 | * PARAMETERS: None | ||
604 | * | ||
605 | * RETURN: Status | ||
606 | * | ||
607 | * DESCRIPTION: Enable all "wakeup" GPEs and disable all of the other GPEs, in | ||
608 | * all GPE blocks. | ||
609 | * | ||
610 | ******************************************************************************/ | ||
611 | |||
612 | acpi_status acpi_enable_all_wakeup_gpes(void) | ||
613 | { | ||
614 | acpi_status status; | ||
615 | |||
616 | ACPI_FUNCTION_TRACE(acpi_enable_all_wakeup_gpes); | ||
617 | |||
618 | status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); | ||
619 | if (ACPI_FAILURE(status)) { | ||
620 | return_ACPI_STATUS(status); | ||
621 | } | ||
622 | |||
623 | status = acpi_hw_enable_all_wakeup_gpes(); | ||
624 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); | ||
625 | |||
626 | return_ACPI_STATUS(status); | ||
627 | } | ||
628 | |||
629 | ACPI_EXPORT_SYMBOL(acpi_enable_all_wakeup_gpes) | ||
630 | |||
599 | /******************************************************************************* | 631 | /******************************************************************************* |
600 | * | 632 | * |
601 | * FUNCTION: acpi_install_gpe_block | 633 | * FUNCTION: acpi_install_gpe_block |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index dc9d037d3055..9fc1d71c82bc 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -692,6 +692,7 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |||
692 | *event_status)) | 692 | *event_status)) |
693 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void)) | 693 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void)) |
694 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void)) | 694 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void)) |
695 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_wakeup_gpes(void)) | ||
695 | 696 | ||
696 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 697 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
697 | acpi_get_gpe_device(u32 gpe_index, | 698 | acpi_get_gpe_device(u32 gpe_index, |