summaryrefslogtreecommitdiffstats
path: root/drivers/platform/chrome/cros_ec_lpc.c
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2017-02-14 20:58:02 +0100
committerBenson Leung <bleung@chromium.org>2017-06-27 09:19:15 -0700
commit29d99b966d60029a11d08b9b004cd84b21ce0d67 (patch)
tree96d561541a90fa53de63670cf27eb6c1726b42ba /drivers/platform/chrome/cros_ec_lpc.c
parentd4da97e59e1004aa1a15dd75469def20cd84ab99 (diff)
downloadlinux-29d99b966d60029a11d08b9b004cd84b21ce0d67.tar.gz
linux-29d99b966d60029a11d08b9b004cd84b21ce0d67.tar.bz2
linux-29d99b966d60029a11d08b9b004cd84b21ce0d67.zip
cros_ec: Don't signal wake event for non-wake host events
The subset of wake-enabled host events is defined by the EC, but the EC may still send non-wake host events if we're in the process of suspending. Get the mask of wake-enabled host events from the EC and filter out non-wake events to prevent spurious aborted suspend attempts. Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Signed-off-by: Thierry Escande <thierry.escande@collabora.com> Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Benson Leung <bleung@chromium.org>
Diffstat (limited to 'drivers/platform/chrome/cros_ec_lpc.c')
-rw-r--r--drivers/platform/chrome/cros_ec_lpc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c
index eeb187e558ce..2b6436d1b6a4 100644
--- a/drivers/platform/chrome/cros_ec_lpc.c
+++ b/drivers/platform/chrome/cros_ec_lpc.c
@@ -231,7 +231,8 @@ static void cros_ec_lpc_acpi_notify(acpi_handle device, u32 value, void *data)
{
struct cros_ec_device *ec_dev = data;
- if (ec_dev->mkbp_event_supported && cros_ec_get_next_event(ec_dev) > 0)
+ if (ec_dev->mkbp_event_supported &&
+ cros_ec_get_next_event(ec_dev, NULL) > 0)
blocking_notifier_call_chain(&ec_dev->event_notifier, 0,
ec_dev);
}