summaryrefslogtreecommitdiff
path: root/include/usb_pd.h
diff options
context:
space:
mode:
authorli feng <li1.feng@intel.com>2020-09-19 17:46:19 -0700
committerCommit Bot <commit-bot@chromium.org>2020-09-23 23:54:09 +0000
commite7eadea4bf1bbef469e661263ecd3a016e5bd1ad (patch)
treeafa26643df133dc38aa19c17cfb79fac23d1fce9 /include/usb_pd.h
parentda7a19ba2716dc4420caf8eb62c6f4e6f1bef4cc (diff)
downloadchrome-ec-e7eadea4bf1bbef469e661263ecd3a016e5bd1ad.tar.gz
usb_pd: Add common function to get PD revision
Add common function for both TCPMv1 and TCPMv2 to get PD revision Modify TCPMv1 pd_get_vdo_ver() to get correct cable VDO version BUG=none BRANCH=none TEST=make buildall Signed-off-by: li feng <li1.feng@intel.com> Change-Id: I7cc597a45e9581346683b7af54894bffb48d16bd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2420468 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'include/usb_pd.h')
-rw-r--r--include/usb_pd.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h
index 2162b0f0d3..c42afd2b28 100644
--- a/include/usb_pd.h
+++ b/include/usb_pd.h
@@ -1311,11 +1311,23 @@ enum pd_msg_type {
void schedule_deferred_pd_interrupt(int port);
/**
- * Get current PD VDO Version
+ * Get current PD Revision
*
* @param port USB-C port number
* @param type USB-C port partner
- * @return 0 for PD_REV1.0, 1 for PD_REV2.0
+ * @return PD_REV10 for PD Revision 1.0
+ * PD_REV20 for PD Revision 2.0
+ * PD_REV30 for PD Revision 3.0
+ */
+int pd_get_rev(int port, enum tcpm_transmit_type type);
+
+/**
+ * Get current PD VDO Version of Structured VDM
+ *
+ * @param port USB-C port number
+ * @param type USB-C port partner
+ * @return VDM_VER10 for VDM Version 1.0
+ * VDM_VER20 for VDM Version 2.0
*/
int pd_get_vdo_ver(int port, enum tcpm_transmit_type type);