summaryrefslogtreecommitdiffstats
path: root/include
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 /include
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 'include')
-rw-r--r--include/linux/mfd/cros_ec.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h
index 3b16c9009749..4e887ba22635 100644
--- a/include/linux/mfd/cros_ec.h
+++ b/include/linux/mfd/cros_ec.h
@@ -149,6 +149,7 @@ struct cros_ec_device {
struct ec_response_get_next_event event_data;
int event_size;
+ u32 host_event_wake_mask;
};
/**
@@ -299,10 +300,12 @@ int cros_ec_query_all(struct cros_ec_device *ec_dev);
* cros_ec_get_next_event - Fetch next event from the ChromeOS EC
*
* @ec_dev: Device to fetch event from
+ * @wake_event: Pointer to a bool set to true upon return if the event might be
+ * treated as a wake event. Ignored if null.
*
* Returns: 0 on success, Linux error number on failure
*/
-int cros_ec_get_next_event(struct cros_ec_device *ec_dev);
+int cros_ec_get_next_event(struct cros_ec_device *ec_dev, bool *wake_event);
/**
* cros_ec_get_host_event - Return a mask of event set by the EC.