aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/events/evxfevnt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/events/evxfevnt.c')
-rw-r--r--drivers/acpi/events/evxfevnt.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c
index aa4dec8edfc5..f7550da85d34 100644
--- a/drivers/acpi/events/evxfevnt.c
+++ b/drivers/acpi/events/evxfevnt.c
@@ -810,3 +810,61 @@ acpi_ev_get_gpe_device(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
810 810
811 return (AE_OK); 811 return (AE_OK);
812} 812}
813
814/******************************************************************************
815 *
816 * FUNCTION: acpi_disable_all_gpes
817 *
818 * PARAMETERS: None
819 *
820 * RETURN: Status
821 *
822 * DESCRIPTION: Disable and clear all GPEs in all GPE blocks
823 *
824 ******************************************************************************/
825
826acpi_status acpi_disable_all_gpes(void)
827{
828 acpi_status status;
829
830 ACPI_FUNCTION_TRACE(acpi_disable_all_gpes);
831
832 status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS);
833 if (ACPI_FAILURE(status)) {
834 return_ACPI_STATUS(status);
835 }
836
837 status = acpi_hw_disable_all_gpes();
838 (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
839
840 return_ACPI_STATUS(status);
841}
842
843/******************************************************************************
844 *
845 * FUNCTION: acpi_enable_all_runtime_gpes
846 *
847 * PARAMETERS: None
848 *
849 * RETURN: Status
850 *
851 * DESCRIPTION: Enable all "runtime" GPEs, in all GPE blocks
852 *
853 ******************************************************************************/
854
855acpi_status acpi_enable_all_runtime_gpes(void)
856{
857 acpi_status status;
858
859 ACPI_FUNCTION_TRACE(acpi_enable_all_runtime_gpes);
860
861 status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS);
862 if (ACPI_FAILURE(status)) {
863 return_ACPI_STATUS(status);
864 }
865
866 status = acpi_hw_enable_all_runtime_gpes();
867 (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
868
869 return_ACPI_STATUS(status);
870}