summaryrefslogtreecommitdiff
path: root/driver/retimer/bb_retimer.c
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2023-01-28 10:35:26 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-02-07 23:24:10 +0000
commit7884deec9f9c255724cf3d32566e7876e0dc3b71 (patch)
tree3a618941b71ea047762631d3c6c0f7effa144846 /driver/retimer/bb_retimer.c
parentd9b9cb6e89a9d3082421e26a3bd20ce08e73379b (diff)
downloadchrome-ec-7884deec9f9c255724cf3d32566e7876e0dc3b71.tar.gz
TCPMv2: Gate DP module support on a CONFIG
Add a CONFIG option to gate DP mode support within the embedded controller. By default, turn the DP module off if the AP is controlling the VDMs for mode entry. For modules which do not implement the DP config option, the header now defines stubs for DP specific functions to use. This obsoletes some of the stub functions from older unit tests. BRANCH=None BUG=b:266714542 TEST=on skyrim, compile with DP disabled and observe 3162 bytes saved, run zmake compare-builds -a and util/compare_build.sh -b all, ./twister -T ./zephyr/test passes (note: ECOS compare builds needed all assert statements removed to pass, as they grab the line number, zephyr compare builds passed before HC mode entry was revamped) Change-Id: I9619eb5d34e418f1972c4bf16d4cf9c8d551eac5 Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4201454 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'driver/retimer/bb_retimer.c')
-rw-r--r--driver/retimer/bb_retimer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/driver/retimer/bb_retimer.c b/driver/retimer/bb_retimer.c
index 5c07e43e71..88eb4835fc 100644
--- a/driver/retimer/bb_retimer.c
+++ b/driver/retimer/bb_retimer.c
@@ -432,6 +432,8 @@ static int retimer_set_state(const struct usb_mux *me, mux_state_t mux_state,
* Bit 8: DP_CONNECTION
* 0 – No DP connection
* 1 – DP connected
+ *
+ * TODO: Refactor if CONFIG_USB_PD_VDM_AP_CONTROL is supported
*/
if (mux_state & USB_PD_MUX_DP_ENABLED) {
set_retimer_con |= BB_RETIMER_DP_CONNECTION;