summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew McRae <amcrae@google.com>2020-06-22 01:23:52 +1000
committerCommit Bot <commit-bot@chromium.org>2020-06-24 07:15:59 +0000
commite6636517406afa7115825de36ac52b5498ca70c4 (patch)
treeca551b16e9a4b6ce14765b0e5d615e212611f38c /include
parent40d09f45d976574338455821a01faae79174a7c2 (diff)
downloadchrome-ec-e6636517406afa7115825de36ac52b5498ca70c4.tar.gz
TCPMv2: Refactor DP mode to use a state machine
Refactor the DP alt mode handling to use a state machine to process the commands, ACKs and NAKs. Also add states to handle detecting a NAK on a DP mode enter command, and attempt to exit the mode and then retry. When a partner enters alt mode (e.g a monitor with DP alt mode), and the EC is reset or goes into recovery mode, the new negotiation will fail because the command to enter alt mode when the partner is already in that mode will fail with a NAK. BUG=b:159073520 TEST=Tested on duffy with a type-C monitor. BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I0b4506b17987ba71e51f019910db84b32a6da2c2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2256620 Reviewed-by: Andrew McRae <amcrae@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org> Tested-by: Andrew McRae <amcrae@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/usb_dp_alt_mode.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/usb_dp_alt_mode.h b/include/usb_dp_alt_mode.h
index 1e43d4c282..5fa703e109 100644
--- a/include/usb_dp_alt_mode.h
+++ b/include/usb_dp_alt_mode.h
@@ -50,7 +50,7 @@ void dp_vdm_naked(int port, enum tcpm_transmit_type type, uint8_t vdm_cmd);
*
* @param port USB-C port number
*/
-void dp_reset_next_command(int port);
+void dp_teardown(int port);
/*
* Construct the next DisplayPort VDM that should be sent.