summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2021-04-30 09:07:10 -0700
committerCommit Bot <commit-bot@chromium.org>2021-05-10 21:19:16 +0000
commitddf11157cd952a6df79aefc06c456eea426b6f10 (patch)
tree14b4455b7c044d19611f145685419d7f96cfea42 /include
parent1dc0c0446eca2caf95765081c3add878ac7be532 (diff)
downloadchrome-ec-ddf11157cd952a6df79aefc06c456eea426b6f10.tar.gz
PCHG: Enable device event on suspend complete
Currently, PCHG can send a device event any time. When a signal is sent to the host while it's attempting to suspend, suspend is delayed by 10 seconds. A solution is to make Powerd disable a corresponding PCHG event (i.e. EC_DEVICE_EVENT_WLC) when it's notifying an upcoming suspend to other processes. This patch makes PCHG re-enable EC_DEVICE_EVENT_WLC after suspend is complete. BUG=b:182973695, b:173235954 BRANCH=trogdor TEST=Verify CoachZ suspends without a delay. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I10d7fcf234a7e0e05ce5d77b8e930a0cf0748331 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2863564 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/device_event.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/device_event.h b/include/device_event.h
index debec00d52..7a6403e51d 100644
--- a/include/device_event.h
+++ b/include/device_event.h
@@ -43,4 +43,11 @@ static inline void device_set_single_event(int event)
device_set_events(EC_DEVICE_EVENT_MASK(event));
}
+/**
+ * Enable device event.
+ *
+ * @param event Event to enable (EC_DEVICE_EVENT_*)
+ */
+void device_enable_event(enum ec_device_event event);
+
#endif /* __CROS_EC_DEVICE_EVENT_H */