summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2020-12-10 16:49:52 -0700
committerCommit Bot <commit-bot@chromium.org>2020-12-11 00:46:16 +0000
commitbc64c3cbedaf3e45780717dc807058b2f1570445 (patch)
tree605d5f00cf0dda171894e97a6a80c5fbc5fb38d0 /common
parentfc996ee44c03b38cd91fbf2c64d5b491a3faa7ea (diff)
downloadchrome-ec-bc64c3cbedaf3e45780717dc807058b2f1570445.tar.gz
TCPMv2: Add source and sink cap PD APIs for TC-only use
Stub out returns of 0 and NULL for the source and sink cap pd_ APIs if a board is not using the PE layer. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I32e74f3f29aacdf47aca9bc9d0664a4d799da3b2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2585749 Reviewed-by: Scott Collyer <scollyer@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/usbc/usb_tc_drp_acc_trysrc_sm.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/common/usbc/usb_tc_drp_acc_trysrc_sm.c b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
index 2429ca8154..52924a7da1 100644
--- a/common/usbc/usb_tc_drp_acc_trysrc_sm.c
+++ b/common/usbc/usb_tc_drp_acc_trysrc_sm.c
@@ -492,6 +492,33 @@ __overridable void pd_set_vbus_discharge(int port, int enable)
#endif /* !CONFIG_USB_PRL_SM */
+#ifndef CONFIG_USB_PE_SM
+
+/*
+ * These pd_ functions are implemented in the PE layer
+ */
+const uint32_t * const pd_get_src_caps(int port)
+{
+ return NULL;
+}
+
+uint8_t pd_get_src_cap_cnt(int port)
+{
+ return 0;
+}
+
+const uint32_t * const pd_get_snk_caps(int port)
+{
+ return NULL;
+}
+
+uint8_t pd_get_snk_cap_cnt(int port)
+{
+ return 0;
+}
+
+#endif /* !CONFIG_USB_PR_SM */
+
void pd_update_contract(int port)
{
if (IS_ENABLED(CONFIG_USB_PE_SM)) {