diff options
author | Abe Levkoy <alevkoy@chromium.org> | 2020-07-15 11:03:25 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-29 03:33:52 +0000 |
commit | 545e72a8540f14416c3d91bf1b5483882a10519e (patch) | |
tree | ac91cc9b5159ad208aa931eea46677acc3c53da0 /test/usb_pe.h | |
parent | a3a577297d83798dd7a74771cfbc621d9228b838 (diff) | |
download | chrome-ec-545e72a8540f14416c3d91bf1b5483882a10519e.tar.gz |
TCPMv2: Optionally build extended message support
If CONFIG_USB_PD_EXTENDED_MESSAGES is defined, support sending and
receiving extended messages. If it is not, remove the chunking state
machines from the PRL and modify the PE to respond with Not Supported as
appropriate.
BUG=b:160374787,b:158572770
TEST=Attach various devices; observe PD traffic
TEST=make run-usb_prl_noextended; make run-usb_pe_drp_noextended
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I862020155927b5613d599274708e60678c49c43c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2304263
Commit-Queue: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'test/usb_pe.h')
-rw-r--r-- | test/usb_pe.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/usb_pe.h b/test/usb_pe.h index c927437103..f67146bd4d 100644 --- a/test/usb_pe.h +++ b/test/usb_pe.h @@ -131,15 +131,21 @@ enum usb_pe_state { PE_BIST_RX, PE_DR_SNK_GET_SINK_CAP, +#ifdef CONFIG_USB_PD_REV30 /* PD3.0 only states below here*/ PE_FRS_SNK_SRC_START_AMS, +#ifdef CONFIG_USB_PD_EXTENDED_MESSAGES PE_GIVE_BATTERY_CAP, PE_GIVE_BATTERY_STATUS, + PE_SEND_ALERT, +#else + PE_SRC_CHUNK_RECEIVED, + PE_SNK_CHUNK_RECEIVED, +#endif /* CONFIG_USB_PD_EXTENDED_MESSAGES */ -#ifdef CONFIG_USB_PD_REV30 /* Super States */ PE_PRS_FRS_SHARED, -#endif +#endif /* CONFIG_USB_PD_REV30 */ }; void set_state_pe(const int port, const enum usb_pe_state new_state); |