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>
This commit is contained in:
committed by
Benson Leung
parent
d4da97e59e
commit
29d99b966d
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user