summaryrefslogtreecommitdiff
path: root/drivers/platform/x86
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-08-21 12:40:19 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-08-22 00:56:05 +0300
commitb90ff3554aa3e123bb7e6d08789f6fd92d86ddde (patch)
tree092b80a53071d6f8f0a6daaa3eec3bad0867c550 /drivers/platform/x86
parent45dc1576e4575ba621cb6d017faf41531d8c1073 (diff)
downloadlinux-b90ff3554aa3e123bb7e6d08789f6fd92d86ddde.tar.xz
ACPI: PM: s2idle: Always set up EC GPE for system wakeup
Commit 10a08fd65ec1 ("ACPI: PM: Set up EC GPE for system wakeup from drivers that need it") assumed that the EC GPE would only need to be set up for system wakeup if either the intel-hid or the intel-vbtn driver was in use, but that turns out to be incorrect. In particular, on ASUS Zenbook UX430UNR/i7-8550U, if the EC GPE is not enabled while suspended, the system cannot be woken up by opening the lid or pressing a key, and that machine doesn't use any of the drivers mentioned above. For this reason, always set up the EC GPE for system wakeup from suspend-to-idle by setting and clearing its wake mask in the ACPI suspend-to-idle callbacks. Fixes: 10a08fd65ec1 ("ACPI: PM: Set up EC GPE for system wakeup from drivers that need it") Reported-by: Kristian Klausen <kristian@klausen.dk> Tested-by: Kristian Klausen <kristian@klausen.dk> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r--drivers/platform/x86/intel-hid.c6
-rw-r--r--drivers/platform/x86/intel-vbtn.c6
2 files changed, 2 insertions, 10 deletions
diff --git a/drivers/platform/x86/intel-hid.c b/drivers/platform/x86/intel-hid.c
index 18ac237114ff..ef6d4bd77b1a 100644
--- a/drivers/platform/x86/intel-hid.c
+++ b/drivers/platform/x86/intel-hid.c
@@ -257,7 +257,6 @@ static int intel_hid_pm_prepare(struct device *device)
struct intel_hid_priv *priv = dev_get_drvdata(device);
priv->wakeup_mode = true;
- acpi_ec_set_gpe_wake_mask(ACPI_GPE_ENABLE);
}
return 0;
}
@@ -266,10 +265,7 @@ static void intel_hid_pm_complete(struct device *device)
{
struct intel_hid_priv *priv = dev_get_drvdata(device);
- if (priv->wakeup_mode) {
- acpi_ec_set_gpe_wake_mask(ACPI_GPE_DISABLE);
- priv->wakeup_mode = false;
- }
+ priv->wakeup_mode = false;
}
static int intel_hid_pl_suspend_handler(struct device *device)
diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c
index b28e5519337e..b74932307d69 100644
--- a/drivers/platform/x86/intel-vbtn.c
+++ b/drivers/platform/x86/intel-vbtn.c
@@ -205,7 +205,6 @@ static int intel_vbtn_pm_prepare(struct device *dev)
struct intel_vbtn_priv *priv = dev_get_drvdata(dev);
priv->wakeup_mode = true;
- acpi_ec_set_gpe_wake_mask(ACPI_GPE_ENABLE);
}
return 0;
}
@@ -214,10 +213,7 @@ static void intel_vbtn_pm_complete(struct device *dev)
{
struct intel_vbtn_priv *priv = dev_get_drvdata(dev);
- if (priv->wakeup_mode) {
- acpi_ec_set_gpe_wake_mask(ACPI_GPE_DISABLE);
- priv->wakeup_mode = false;
- }
+ priv->wakeup_mode = false;
}
static int intel_vbtn_pm_resume(struct device *dev)