summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2020-04-04 21:51:10 -0600
committerCommit Bot <commit-bot@chromium.org>2020-04-08 22:39:59 +0000
commita1369e5e1eb98bb0e25df3319b14bcb9cd2e64a4 (patch)
treefd21811d883744f712f9e59afd1aa8ddd7cb700f /include
parent581e6f9a83d468d02f40c2c0d811fc25c73be54b (diff)
downloadchrome-ec-a1369e5e1eb98bb0e25df3319b14bcb9cd2e64a4.tar.gz
TCPMv2: Send VDM version according to PD rev set
Sets the VDM version field according to the PD revision being used for the port and type. Also removes the pd_get_rev() declaration from the usb_pd header as it's only used in the TCPMv1 protocol file. BRANCH=None BUG=b:150784275 TEST=on kindred with TCPMv2, confirm VMDs sent to PD 3.0 partner are versioned as VDM 2.0 and PD 2.0 partner is versioned as VDM 1.0. Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ibff3f020ecf494773da7038c59d50667cd40bfa7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2136904 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/usb_pd.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h
index f781abae22..cb450db1be 100644
--- a/include/usb_pd.h
+++ b/include/usb_pd.h
@@ -1246,26 +1246,14 @@ enum pd_msg_type {
/** Schedules the interrupt handler for the TCPC on a high priority task. */
void schedule_deferred_pd_interrupt(int port);
-#ifdef CONFIG_USB_PD_REV30
-/**
- * Get current PD Revision
- *
- * @param port USB-C port number
- * @return 0 for PD_REV1.0, 1 for PD_REV2.0, 2 for PD_REV3.0
- */
-int pd_get_rev(int port);
-
/**
* Get current PD VDO Version
*
* @param port USB-C port number
+ * @param type USB-C port partner
* @return 0 for PD_REV1.0, 1 for PD_REV2.0
*/
-int pd_get_vdo_ver(int port);
-#else
-#define pd_get_rev(n) PD_REV20
-#define pd_get_vdo_ver(n) VDM_VER10
-#endif
+int pd_get_vdo_ver(int port, enum tcpm_transmit_type type);
/**
* Check if max voltage request is allowed (only used if