summaryrefslogtreecommitdiff
path: root/include/mock/usb_pe_sm_mock.h
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2020-06-11 13:37:36 -0600
committerCommit Bot <commit-bot@chromium.org>2020-06-25 23:57:54 +0000
commit2f651922b48ed2ed4a592ca2f61b82d7df7f0006 (patch)
treefff962a20c981472661782e3cbf48ec2f84698f1 /include/mock/usb_pe_sm_mock.h
parent07fc2cff6d8575ca89e563fca741a0ea454fff9d (diff)
downloadchrome-ec-2f651922b48ed2ed4a592ca2f61b82d7df7f0006.tar.gz
TCPMv2: Report message discard to the PE
This commit creates a reporting function for the PRL to let the PE know when messages have been discarded. States will have to handle message discard internally since the response depends on the portion of the AMS sequence they're in. For some states which begin AMSes, a new shared parent has been added which runs the sender response timer and checks discard for the child. More states (and discard mid-AMS) are expected to be added in future CLs. The new parent state saves an average of 124 bytes of flash space. BRANCH=None BUG=b:158248741,b:157228506 TEST=on waddledoo, Dell dock no longer soft resets during power role swap Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I61b3e96e1d14634dcd5edda4e133968ace769b21 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2241577 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'include/mock/usb_pe_sm_mock.h')
-rw-r--r--include/mock/usb_pe_sm_mock.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mock/usb_pe_sm_mock.h b/include/mock/usb_pe_sm_mock.h
index b678df9d7b..720ec7d219 100644
--- a/include/mock/usb_pe_sm_mock.h
+++ b/include/mock/usb_pe_sm_mock.h
@@ -19,6 +19,7 @@ struct mock_pe_port_t {
int mock_pe_got_hard_reset;
int mock_pe_message_received;
int mock_got_soft_reset;
+ int mock_pe_message_discarded;
};
extern struct mock_pe_port_t mock_pe_port[CONFIG_USB_PD_PORT_MAX_COUNT];