summaryrefslogtreecommitdiff
path: root/common/usb_common.c
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@chromium.org>2021-06-10 14:17:33 -0700
committerCommit Bot <commit-bot@chromium.org>2021-06-11 21:20:39 +0000
commitc1da363a46b718f12089189f0dab30172d33105a (patch)
tree43e2f452023eb994fa201302f12544ace246bf9f /common/usb_common.c
parent4a46ad60f03301f0184df4a0f977b02cfeb3a1f7 (diff)
downloadchrome-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 'common/usb_common.c')
-rw-r--r--common/usb_common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/usb_common.c b/common/usb_common.c
index dc8fb21e0a..9e17c0d98c 100644
--- a/common/usb_common.c
+++ b/common/usb_common.c
@@ -356,6 +356,11 @@ __overridable bool board_is_usb_pd_port_present(int port)
return (port >= 0) && (port < board_get_usb_pd_port_count());
}
+__overridable bool board_is_dts_port(int port)
+{
+ return true;
+}
+
int pd_get_retry_count(int port, enum tcpm_transmit_type type)
{
/* PD 3.0 6.7.7: nRetryCount = 2; PD 2.0 6.6.9: nRetryCount = 3 */