summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/ec.c1
-rw-r--r--drivers/acpi/sleep.c15
2 files changed, 13 insertions, 3 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 58597ec813eb..da1e5c5ce150 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -1970,7 +1970,6 @@ void acpi_ec_set_gpe_wake_mask(u8 action)
if (pm_suspend_no_platform() && first_ec && !ec_no_wakeup)
acpi_set_gpe_wake_mask(NULL, first_ec->gpe, action);
}
-EXPORT_SYMBOL_GPL(acpi_ec_set_gpe_wake_mask);
bool acpi_ec_dispatch_gpe(void)
{
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index c52ecbda863f..9fa77d72ef27 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -938,6 +938,13 @@ static int lps0_device_attach(struct acpi_device *adev,
if (mem_sleep_default > PM_SUSPEND_MEM && !acpi_sleep_default_s3)
mem_sleep_current = PM_SUSPEND_TO_IDLE;
+ /*
+ * Some LPS0 systems, like ASUS Zenbook UX430UNR/i7-8550U, require the
+ * EC GPE to be enabled while suspended for certain wakeup devices to
+ * work, so mark it as wakeup-capable.
+ */
+ acpi_ec_mark_gpe_for_wake();
+
return 0;
}
@@ -954,8 +961,10 @@ static int acpi_s2idle_begin(void)
static int acpi_s2idle_prepare(void)
{
- if (acpi_sci_irq_valid())
+ if (acpi_sci_irq_valid()) {
enable_irq_wake(acpi_sci_irq);
+ acpi_ec_set_gpe_wake_mask(ACPI_GPE_ENABLE);
+ }
acpi_enable_wakeup_devices(ACPI_STATE_S0);
@@ -1034,8 +1043,10 @@ static void acpi_s2idle_restore(void)
acpi_disable_wakeup_devices(ACPI_STATE_S0);
- if (acpi_sci_irq_valid())
+ if (acpi_sci_irq_valid()) {
+ acpi_ec_set_gpe_wake_mask(ACPI_GPE_DISABLE);
disable_irq_wake(acpi_sci_irq);
+ }
}
static void acpi_s2idle_end(void)