From 6071cb1e1682796730f1f77072ae75c51b61c4f9 Mon Sep 17 00:00:00 2001 From: Abe Levkoy Date: Wed, 29 Apr 2020 10:29:50 -0600 Subject: TCPMv2: Store Tx type in PE state This will be used for VDM request state for discovery. Also change names of identity discovery timer and counter fields to comport with PD spec. This is substantially based on https://crrev.com/c/2148427. BUG=none TEST=make buildall BRANCH=none Change-Id: Iabda5c4cd169944a6c84bc72f551de7eb82ab424 Signed-off-by: Abe Levkoy Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2174463 Reviewed-by: Diana Z --- common/usb_pd_alt_mode_dfp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'common/usb_pd_alt_mode_dfp.c') diff --git a/common/usb_pd_alt_mode_dfp.c b/common/usb_pd_alt_mode_dfp.c index 3ec48fa213..715dc9b995 100644 --- a/common/usb_pd_alt_mode_dfp.c +++ b/common/usb_pd_alt_mode_dfp.c @@ -510,6 +510,10 @@ enum idh_ptype get_usb_pd_cable_type(int port) return cable->type; } +/* + * TODO(b/152417597): Support SOP and SOP'; eliminate redundant code for port + * partner and cable identity discovery. + */ void dfp_consume_cable_response(int port, int cnt, uint32_t *payload, uint16_t head) { @@ -547,7 +551,6 @@ void dfp_consume_cable_response(int port, int cnt, uint32_t *payload, payload[VDO_INDEX_PTYPE_CABLE2]; cable->is_identified = 1; - cable->discovery = PD_DISC_COMPLETE; } } -- cgit v1.2.1