diff options
author | Eric Yilun Lin <yllin@chromium.org> | 2022-04-11 10:46:48 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-04-15 03:24:37 +0000 |
commit | 0b2280ffc4da0a97bffff6f2ed49d824d3d601ae (patch) | |
tree | acb1856d21c58c501634cfa993baf1330ffcf6fa /include | |
parent | e6afc4c7862fcd343287ab5ec5af902fe8735bc1 (diff) | |
download | chrome-ec-0b2280ffc4da0a97bffff6f2ed49d824d3d601ae.tar.gz |
TCPMv2: Obtain correct dual role state when chipset on
Some boards (eg. corsola) can only source VBUS until XHCI initialization
finished in S0 sate. In this case DRP state should be set to force sink
instead of toggle on.
This CL introduces pd_get_drp_state_in_s0() function and
uses it to obtain correct DRP state when chipset on.
Default implementation of pd_get_drp_state_in_s0() returns
PD_DRP_TOGGLE_ON, so this commit introduces no functional changes.
BUG=b:224471170
TEST=zmake testall
BRANCH=none
Change-Id: Ic7f18dee8bddbd748715887377b1b3f9cac34ca0
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3581617
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Tested-by: Eric Yilun Lin <yllin@google.com>
Auto-Submit: Eric Yilun Lin <yllin@google.com>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Commit-Queue: Eric Yilun Lin <yllin@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/usb_pd.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h index 133528c3ba..8468de814a 100644 --- a/include/usb_pd.h +++ b/include/usb_pd.h @@ -1694,6 +1694,14 @@ __override_proto void pd_execute_data_swap(int port, __override_proto enum pd_dual_role_states pd_get_drp_state_in_suspend(void); /** + * Get desired dual role state when chipset is on. + * + * Under some circumstances we are not allowed to be source + * during chipset on. This function should return appropriate state. + */ +__override_proto enum pd_dual_role_states pd_get_drp_state_in_s0(void); + +/** * Get PD device info used for VDO_CMD_SEND_INFO / VDO_CMD_READ_INFO * * @param info_data pointer to info data array |