summaryrefslogtreecommitdiff
path: root/include/usb_pd.h
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2020-01-30 14:06:46 -0800
committerCommit Bot <commit-bot@chromium.org>2020-03-12 23:44:00 +0000
commit36d2d918d324214afdb2e6cb05de9ed40ee681ef (patch)
treef92817af05b265b7ed86a5b5dee72fef26096a1e /include/usb_pd.h
parent7f3b64dd6abccf6fdb592eaf06901166cd2833bd (diff)
downloadchrome-ec-36d2d918d324214afdb2e6cb05de9ed40ee681ef.tar.gz
TCPMv2: Allow reduced functionality to PD2.0 features
Some TCPCs only work with PD2.0 messages. So a config flag is added to restrict the TCPMv2 stack to working at PD2.0 revision. If the config flag is defined, the PD revision is fixed at PD2.0. In a future CL, the config flag can also be used to reduce code size by not compiling in PD3.0 features. BUG=chromium:1021235 BRANCH=none TEST=make -j buildall Manual tests: Verified that the stack only works at PD2.0 rev, using a twinki and several docks. Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: Ic5fc8d24baec3bdecffb4dd54a6aac28d72550cb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2032145 Tested-by: Sam Hurst <shurst@google.com> Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Sam Hurst <shurst@google.com>
Diffstat (limited to 'include/usb_pd.h')
-rw-r--r--include/usb_pd.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h
index 8f313b8c64..cdd111d687 100644
--- a/include/usb_pd.h
+++ b/include/usb_pd.h
@@ -546,6 +546,12 @@ enum pd_rev_type {
PD_REV30,
};
+#ifdef CONFIG_USB_PD_REV20
+#define PD_REVISION PD_REV20
+#else
+#define PD_REVISION PD_REV30
+#endif
+
/* Cable structure for storing cable attributes */
struct pd_cable {
/* Note: the following fields are used by TCPMv1 */