summaryrefslogtreecommitdiff
path: root/include/task.h
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2018-07-19 10:18:43 -0600
committerchrome-bot <chrome-bot@chromium.org>2018-07-25 00:14:29 -0700
commitd9ce7b5c3afca7d60f6aa76e9ec7e2888bd1737e (patch)
tree4fefb19e1554d5c1dc426fdd1b64ea9b0a897f1c /include/task.h
parente54b26e716949b780ae21c75fefb27e1f7dc8c44 (diff)
downloadchrome-ec-d9ce7b5c3afca7d60f6aa76e9ec7e2888bd1737e.tar.gz
tcpm: wait for TCPC to init upon first tcpc access
Most TCPCs need to re-initialize after coming out of low power mode. TCPCs can NACK before they are fully reinitialized. Now upon any failed TCPC access where we think the device is in low power mode, we wait until we finish performing a tcpc_init and retry the request. BRANCH=none BUG=b:79529011 TEST=run 'ectool usbpdmuxinfo' and while PS8751 is in low power mode. See that is responds with good data now (where as it always returned an error before since it was nacking the i2c calls while it was waking up) Signed-off-by: Jett Rink <jettrink@chromium.org> Change-Id: I50b3835484dabafecc3130588019fcbcf6ccf37e Reviewed-on: https://chromium-review.googlesource.com/1143710 Commit-Ready: Jett Rink <jettrink@chromium.org> Tested-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'include/task.h')
-rw-r--r--include/task.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/task.h b/include/task.h
index 78c8ad9c06..f0b680386b 100644
--- a/include/task.h
+++ b/include/task.h
@@ -13,7 +13,9 @@
/* Task event bitmasks */
/* Tasks may use the bits in TASK_EVENT_CUSTOM for their own events */
-#define TASK_EVENT_CUSTOM(x) (x & 0x0007ffff)
+#define TASK_EVENT_CUSTOM(x) (x & 0x0003ffff)
+
+#define TASK_EVENT_PD_AWAKE (1 << 18)
/* npcx peci event */
#define TASK_EVENT_PECI_DONE (1 << 19)