diff options
author | Abe Levkoy <alevkoy@chromium.org> | 2020-10-15 10:52:50 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-22 19:38:09 +0000 |
commit | e1728abb335acf11e2c9512ae88181a770935850 (patch) | |
tree | 75e3d109394193178e2552bf41f0492d44f5db01 /include/usb_pd.h | |
parent | 67645100a8dd165840c65f4bb73343ec1e53300f (diff) | |
download | chrome-ec-e1728abb335acf11e2c9512ae88181a770935850.tar.gz |
TCPMv2: Add typeccontrol enter-mode subcommand
Define and implement TYPEC_CONTROL_COMMAND_ENTER_MODE. Allow DPM state
to be accessed asynchronously by host commands. Add support for this
command to ectool.
BUG=b:168030639
TEST=Attach DP dongle; discovers but does not enter
TEST=ectool typeccontrol 1 2 0; enters DP
TEST=Attach TBT dock and TBT active cable; discovers but does not enter
TEST=ectool typeccontrol 1 2 1; enters TBT
BRANCH=none
Change-Id: I218c4b9a92004ef1efe9a27b2a920031961b33f3
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2454538
Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'include/usb_pd.h')
-rw-r--r-- | include/usb_pd.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h index df5f785135..6c9de3307e 100644 --- a/include/usb_pd.h +++ b/include/usb_pd.h @@ -2609,6 +2609,18 @@ uint32_t pd_get_events(int port); */ void pd_clear_events(int port, uint32_t clear_mask); +/* + * Requests that the port enter the specified mode. A successful result just + * means that the request was received, not that the mode has been entered yet. + * + * @param port USB-C port number + * @param mode The mode to enter + * @return EC_RES_SUCCESS if the request was made + * EC_RES_INVALID_PARAM for an invalid port or mode; + * EC_RES_BUSY if another mode entry request is already in progress + */ +enum ec_status pd_request_enter_mode(int port, enum typec_mode mode); + /** * Get port partner data swap capable status * |