diff options
author | Ayushee <ayushee.shah@intel.com> | 2020-06-16 13:55:08 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-06-26 09:30:36 +0000 |
commit | d8c83aa6b30658ccb8d8ef1e46cc5d30dc491ebe (patch) | |
tree | d0c870e4d524ed59ac17e68eb42e41d6c7baafe3 /driver/retimer | |
parent | c0cee430c75fd428876416c7b3ede705c19dce0f (diff) | |
download | chrome-ec-d8c83aa6b30658ccb8d8ef1e46cc5d30dc491ebe.tar.gz |
usb_pd: Remove pd_cable dependent Thunderbolt code from common code
1. Separated the common functions needed to check for port/cable's
Thunderbolt mode compatibility back into TCPMv1.
2. Refactored the common Thunderbolt mode functions using pd_cable
structure for mode information by adding
a. Generic function that returns the Discover Mode response of
specified SVID.
b. Thunderbolt specific functiion that returns Discover Mode
response of Intel SVID.
3. Removed the redundant pd_cable structure from DRP state machine
policy engine.
BUG=b:158294748
b:150611251
BRANCH=None
TEST=1. Able to enter into Thunderbolt mode on TCPMv1
Change-Id: I30c8f1a007228408e08520502db00601ca3a2521
Signed-off-by: Ayushee <ayushee.shah@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2249020
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'driver/retimer')
-rw-r--r-- | driver/retimer/bb_retimer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/driver/retimer/bb_retimer.c b/driver/retimer/bb_retimer.c index ea287a927b..8855f049b1 100644 --- a/driver/retimer/bb_retimer.c +++ b/driver/retimer/bb_retimer.c @@ -165,8 +165,9 @@ static void retimer_set_state_dfp(int port, mux_state_t mux_state, *set_retimer_con |= BB_RETIMER_ACTIVE_PASSIVE; if (mux_state & USB_PD_MUX_TBT_COMPAT_ENABLED) { - cable_resp = get_cable_tbt_vdo(port); - dev_resp = get_dev_tbt_vdo(port); + cable_resp.raw_value = + pd_get_tbt_mode_vdo(port, TCPC_TX_SOP_PRIME); + dev_resp.raw_value = pd_get_tbt_mode_vdo(port, TCPC_TX_SOP); /* * Bit 2: RE_TIMER_DRIVER |