summaryrefslogtreecommitdiff
path: root/test/fake_usbc.c
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2020-03-24 16:46:14 -0700
committerCommit Bot <commit-bot@chromium.org>2020-04-02 09:40:09 +0000
commit28f07760f384789a6a28801c0c42d9d61af2f99b (patch)
tree6a3b98e52fa4fa3d49909be781df1c7f77c92a45 /test/fake_usbc.c
parentf648164f18293a2b3e2c5e0b766a8edef787ee9d (diff)
downloadchrome-ec-28f07760f384789a6a28801c0c42d9d61af2f99b.tar.gz
TCPMv2: Restore PD state after Sysjump
When a PD explicit contract is negotiated in RO, the contract is maintained while performing a sysjump to RW. This is done by serializing the PD Power, Data, and VCONN Roles, along with the explicit contract flag. After jumping to RW, deserialization is performed by restoring the power roles and setting the explicit contract flag. BUG=b:152350558,b:152027807,b:152967274 BRANCH=none TEST=make -j buildall Manual tests: Used total phase to verify that charging voltage was maintained across sysjump from RO to RW and that DP was reestablished when a dock was used. Tested that Kohaku booted properly without a battery and a charger connected to port 0. This test was repeated with a charger connected to port 1. Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I349c41f2279e9af9830564d44ac73ad8435f1f80 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2119131 Tested-by: Sam Hurst <shurst@google.com> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'test/fake_usbc.c')
-rw-r--r--test/fake_usbc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/fake_usbc.c b/test/fake_usbc.c
index 73c992676b..a096652020 100644
--- a/test/fake_usbc.c
+++ b/test/fake_usbc.c
@@ -126,6 +126,10 @@ __overridable void tc_start_error_recovery(int port)
__overridable void tc_snk_power_off(int port)
{}
+__overridable void pe_invalidate_explicit_contract(int port)
+{
+}
+
int pd_dev_store_rw_hash(int port, uint16_t dev_id, uint32_t *rw_hash,
uint32_t ec_image)
{