acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info) { acpi_status status; ACPI_FUNCTION_TRACE(ev_disable_gpe); /* Make sure HW enable masks are updated */ status = acpi_ev_update_gpe_enable_masks(gpe_event_info, ACPI_GPE_DISABLE); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } /* Clear the appropriate enabled flags for this GPE */ switch (gpe_event_info->flags & ACPI_GPE_TYPE_MASK) { case ACPI_GPE_TYPE_WAKE: ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_WAKE_ENABLED); break; case ACPI_GPE_TYPE_WAKE_RUN: ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_WAKE_ENABLED); /* fallthrough */ case ACPI_GPE_TYPE_RUNTIME: /* Disable the requested runtime GPE */ ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_RUN_ENABLED); break; default: break; } /* * Even if we don't know the GPE type, make sure that we always * disable it. low_disable_gpe will just clear the enable bit for this * GPE and write it. It will not write out the current GPE enable mask, * since this may inadvertently enable GPEs too early, if a rogue GPE has * come in during ACPICA initialization - possibly as a result of AML or * other code that has enabled the GPE. */ status = acpi_hw_low_disable_gpe(gpe_event_info); return_ACPI_STATUS(status); }
acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info) { acpi_status status; ACPI_FUNCTION_TRACE(ev_disable_gpe); status = acpi_ev_update_gpe_enable_masks(gpe_event_info, ACPI_GPE_DISABLE); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } switch (gpe_event_info->flags & ACPI_GPE_TYPE_MASK) { case ACPI_GPE_TYPE_WAKE: ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_WAKE_ENABLED); break; case ACPI_GPE_TYPE_WAKE_RUN: ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_WAKE_ENABLED); case ACPI_GPE_TYPE_RUNTIME: ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_RUN_ENABLED); break; default: break; } status = acpi_hw_low_disable_gpe(gpe_event_info); return_ACPI_STATUS(status); }