diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2015-11-19 16:51:37 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-11-25 12:59:17 -0800 |
commit | 767e132d133b6f1216d630bd3b59e893a59bcffa (patch) | |
tree | cd42c82ce7d2246484f3980a1dc7e9966e57e633 /include | |
parent | 9665d0b1df2edf954e2c3578c4905d5ca8138edc (diff) | |
download | chrome-ec-767e132d133b6f1216d630bd3b59e893a59bcffa.tar.gz |
pd: Add support for multiple distinct TCPC alert signals
If multiple TCPCs are present on a system then we may have multiple
alert signals, each of which alerts us to the status of a different
TCPC. Make boards with external non cros-ec TCPCs define
tcpc_get_alert_status, which returns alert status based upon any alert
GPIOs present, and then service only ports which are alerting.
BUG=chromium:551683,chrome-os-partner:47851
TEST=Verify snoball PDCMD task sleeps appropriately when no devices are
inserted, and verify ports go to PD_DISCOVERY state when we attach
samus. Also verify that glados / glados_pd can still negotiate PD.
BRANCH=None
Change-Id: Iae6c4e1ef4d6685cb5bf7feef713505925a07c8c
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/313209
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/usb_pd_tcpm.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/usb_pd_tcpm.h b/include/usb_pd_tcpm.h index 6b1180cafd..4e1b04249e 100644 --- a/include/usb_pd_tcpm.h +++ b/include/usb_pd_tcpm.h @@ -57,6 +57,14 @@ struct tcpc_config_t { }; /** + * Returns the PD_STATUS_TCPC_ALERT_* mask corresponding to the TCPC ports + * that are currently asserting ALERT. + * + * @return PD_STATUS_TCPC_ALERT_* mask. + */ +uint16_t tcpc_get_alert_status(void); + +/** * Initialize TCPM driver and wait for TCPC readiness. * * @param port Type-C port number |