summaryrefslogtreecommitdiff
path: root/include/mock/tcpc_mock.h
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-11-04 12:11:58 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-05 04:22:34 +0000
commit252457d4b21f46889eebad61d4c0a65331919cec (patch)
tree01856c4d31d710b20e85a74c8d7b5836e35c3b98 /include/mock/tcpc_mock.h
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-stabilize-14589.B-ish.tar.gz
In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'include/mock/tcpc_mock.h')
-rw-r--r--include/mock/tcpc_mock.h37
1 files changed, 0 insertions, 37 deletions
diff --git a/include/mock/tcpc_mock.h b/include/mock/tcpc_mock.h
deleted file mode 100644
index 9098fe1ba3..0000000000
--- a/include/mock/tcpc_mock.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright 2019 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
- /* Mock for the TCPC interface */
-
-#include "usb_pd_tcpm.h"
-#include "usb_pd.h"
-
-/* Controller for TCPC state */
-struct mock_tcpc_ctrl {
- enum tcpc_cc_voltage_status cc1;
- enum tcpc_cc_voltage_status cc2;
- int vbus_level;
- int num_calls_to_set_header;
- bool should_print_call;
- uint64_t first_call_to_enable_auto_toggle;
-
- /* Set to function pointer if callback is needed for test code */
- struct tcpm_drv callbacks;
-
- /* Store the latest values that were set on TCPC API */
- struct {
- enum pd_power_role power_role;
- enum pd_data_role data_role;
- enum tcpc_cc_pull cc;
- enum tcpc_rp_value rp;
- enum tcpc_cc_polarity polarity;
- } last;
-
-};
-
-/* Reset this TCPC mock */
-void mock_tcpc_reset(void);
-
-extern const struct tcpm_drv mock_tcpc_driver;
-extern struct mock_tcpc_ctrl mock_tcpc;