|
|
@@ -940,6 +940,8 @@ static int lps0_device_attach(struct acpi_device *adev,
|
|
|
|
|
|
acpi_handle_debug(adev->handle, "_DSM function mask: 0x%x\n",
|
|
|
bitmask);
|
|
|
+
|
|
|
+ acpi_ec_mark_gpe_for_wake();
|
|
|
} else {
|
|
|
acpi_handle_debug(adev->handle,
|
|
|
"_DSM function 0 evaluation failed\n");
|
|
|
@@ -968,11 +970,16 @@ static int acpi_s2idle_prepare(void)
|
|
|
if (lps0_device_handle) {
|
|
|
acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF);
|
|
|
acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY);
|
|
|
+
|
|
|
+ acpi_ec_set_gpe_wake_mask(ACPI_GPE_ENABLE);
|
|
|
}
|
|
|
|
|
|
if (acpi_sci_irq_valid())
|
|
|
enable_irq_wake(acpi_sci_irq);
|
|
|
|
|
|
+ /* Change the configuration of GPEs to avoid spurious wakeup. */
|
|
|
+ acpi_enable_all_wakeup_gpes();
|
|
|
+ acpi_os_wait_events_complete();
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
@@ -1017,10 +1024,14 @@ static void acpi_s2idle_sync(void)
|
|
|
|
|
|
static void acpi_s2idle_restore(void)
|
|
|
{
|
|
|
+ acpi_enable_all_runtime_gpes();
|
|
|
+
|
|
|
if (acpi_sci_irq_valid())
|
|
|
disable_irq_wake(acpi_sci_irq);
|
|
|
|
|
|
if (lps0_device_handle) {
|
|
|
+ acpi_ec_set_gpe_wake_mask(ACPI_GPE_DISABLE);
|
|
|
+
|
|
|
acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT);
|
|
|
acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON);
|
|
|
}
|