summaryrefslogtreecommitdiff
path: root/common/mock
diff options
context:
space:
mode:
authorEric Herrmann <eherrmann@chromium.org>2021-01-12 12:41:52 -0800
committerCommit Bot <commit-bot@chromium.org>2021-01-20 21:44:51 +0000
commit2e830d3145fe6b6a9faf377c38a4066a930f23ba (patch)
tree41241a5b7509328aaf658d309805223850c00b07 /common/mock
parent2eae769ad34ceaae5ce770beae546724801f4ef8 (diff)
downloadchrome-ec-2e830d3145fe6b6a9faf377c38a4066a930f23ba.tar.gz
TCPMv2: Do not check for SinkTxOk in FRS-Mode
After an FRS signal, the initial sink will attempt to initiate the FR Swap AMS, and the initial source should apply SinkTxOk. If the initial source is removed entirely, FRS will be triggered butSinkTxOk will never be applied and this will get the initial sink state machine stuck. So, in the case of an FRS ignore the CC voltage. After an FRS signal, the source isn't allowed to initiate an AMS. BUG=b:171740860 TEST=On Volteer with the PS8815, enable FRS and remove the FRS device. Make sure we enter ErrorRecovery instead of hanging in PE_PRS_SNK_SRC_Send_Swap TEST=make buildall BRANCH=none Change-Id: I8373a76c0c19feeb909b0623a1ae2d6b0ad5fa60 Signed-off-by: Eric Herrmann <eherrmann@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2633654 Commit-Queue: Diana Z <dzigterman@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'common/mock')
-rw-r--r--common/mock/usb_pe_sm_mock.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/mock/usb_pe_sm_mock.c b/common/mock/usb_pe_sm_mock.c
index e7e9230901..150cbb51e6 100644
--- a/common/mock/usb_pe_sm_mock.c
+++ b/common/mock/usb_pe_sm_mock.c
@@ -81,6 +81,11 @@ void pe_got_soft_reset(int port)
mock_pe_port[port].mock_got_soft_reset = 1;
}
+bool pe_in_frs_mode(int port)
+{
+ return false;
+}
+
bool pe_in_local_ams(int port)
{
/* We will probably want to change this in the future */