diff options
author | Caveh Jalali <caveh@chromium.org> | 2021-06-10 14:17:33 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-11 21:20:39 +0000 |
commit | c1da363a46b718f12089189f0dab30172d33105a (patch) | |
tree | 43e2f452023eb994fa201302f12544ace246bf9f /include/usb_pd.h | |
parent | 4a46ad60f03301f0184df4a0f977b02cfeb3a1f7 (diff) | |
download | chrome-ec-c1da363a46b718f12089189f0dab30172d33105a.tar.gz |
common/usbc: Allow boards to determine DTS (CCD) port
This adds support for a board specific function to determine if a
particular port supports DTS (Debug and Test System) - more commonly
known as the CCD port. Typically, only one port supports CCD and we
should not enter debug accessory mode on non-CCD ports.
The default implementation simply returns true which is equivalent to
the original behavior. Boards can override board_is_dts_port() to limit
entering debug accessory mode to specific ports.
BRANCH=none
BUG=b:188851792
TEST=buildall passes
Change-Id: I10ad3cbed68478b23379b5f7ec6eff6ebae11084
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2954196
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'include/usb_pd.h')
-rw-r--r-- | include/usb_pd.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h index 751907d3c8..c7d16aed52 100644 --- a/include/usb_pd.h +++ b/include/usb_pd.h @@ -3056,6 +3056,16 @@ __override_proto uint8_t board_get_usb_pd_port_count(void); __override_proto bool board_is_usb_pd_port_present(int port); /** + * Return true if specified PD port is DTS (Debug and Test System + * capable). + * + * @param port USB-C port number + * + * @return true if port is DTS capable. + */ +__override_proto bool board_is_dts_port(int port); + +/** * Process PD-related alerts for a chip which is sharing the TCPC interrupt line * * @param port USB-C port number |