diff options
author | Ayushee <ayushee.shah@intel.com> | 2020-06-15 23:52:57 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-06-25 10:44:24 +0000 |
commit | 975dd4356b6036c3e06ebcc1e21a9195717e33bb (patch) | |
tree | e2ba23b1c181a5de5df409fc8e8b007e286c78fe /common/usb_pd_protocol.c | |
parent | 8625c8d66202d62a9c68fdba2a8bfbc49d05e9cf (diff) | |
download | chrome-ec-975dd4356b6036c3e06ebcc1e21a9195717e33bb.tar.gz |
usb_pd: Remove pd_cable usage from common code
Previously, the Discovery Identity SOP' response for TCPMv1/2 was being
stored in pd_discovery and in pd_cable. This commit removes the storage
of Discover Identity SOP' response from the pd_cable structure.
BUG=b:158294748
b:159504972
BRANCH=None
TEST=1. Able to get the cable characteristics
2. Able to enter into Thunderbolt mode on TCPMv1
3. Able to enter into USB4 mode on TCPMv1
Change-Id: I1e5112f9aa158c41abb6226a3819f1612ed906bd
Signed-off-by: Ayushee <ayushee.shah@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2247211
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'common/usb_pd_protocol.c')
-rw-r--r-- | common/usb_pd_protocol.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index 31093b9a2d..9d95b5b480 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -343,6 +343,9 @@ int pd_get_rev(int port) int pd_get_vdo_ver(int port, enum tcpm_transmit_type type) { + if (type == TCPC_TX_SOP_PRIME) + return get_usb_pd_cable_revision(port); + return vdo_ver[pd[port].rev]; } #else |