summaryrefslogtreecommitdiff
path: root/include/usb_pe_sm.h
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 /include/usb_pe_sm.h
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 'include/usb_pe_sm.h')
-rw-r--r--include/usb_pe_sm.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/usb_pe_sm.h b/include/usb_pe_sm.h
index 6a4aea5415..3e8f0e85b4 100644
--- a/include/usb_pe_sm.h
+++ b/include/usb_pe_sm.h
@@ -140,6 +140,15 @@ int pd_is_port_partner_dualrole(int port);
void pe_invalidate_explicit_contract(int port);
/*
+ * Return true if the PE is in middle of a fast role swap (FRS). If so, the
+ * Rp/Rd will be flipped from the actual power roles.
+ *
+ *
+ * @param port USB-C port number
+ */
+bool pe_in_frs_mode(int port);
+
+/*
* Return true if the PE is is within an atomic
* messaging sequence that it initiated with a SOP* port partner.
*