summaryrefslogtreecommitdiff
path: root/zephyr/test/kingler/src/fakes.c
diff options
context:
space:
mode:
authorlschyi <lschyi@google.com>2023-05-15 15:37:12 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-05-16 01:49:13 +0000
commitefe0fbc416966340abae6539df8b2ab5a7e5a219 (patch)
tree83cc915ecea5236754a8f5433e93b970c323b5c8 /zephyr/test/kingler/src/fakes.c
parent69f476737a9167bd5d650d74d2f2e809ef203275 (diff)
downloadchrome-ec-efe0fbc416966340abae6539df8b2ab5a7e5a219.tar.gz
corsola: Fix reported USB-C ports for no DB design with DB detection on
The definition of `CORSOLA_DB_NONE` was settled to no DB in the project in the previous CL "corsola: Update implementation for no daughter board ", and the USB-C counts is determined by dts settings in previous CL " corosla: Improve USB-C port configuration". This introduces a reported port number mismatch when the DB detection is enabled, and the desired detection result is no DB in the design. Extend the DB status enum with `CORSOLA_DB_NO_DETECTION` to properly describe the different DB status, and fix the reported USB-C port logic. BUG=b:282625153 TEST=`zmake build <all board> --clobber` Change-Id: Idd55381759677272e0bfc7b270647d759642ce01 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4530326 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Tested-by: Sung-Chi Li <lschyi@chromium.org> Commit-Queue: Sung-Chi Li <lschyi@chromium.org>
Diffstat (limited to 'zephyr/test/kingler/src/fakes.c')
-rw-r--r--zephyr/test/kingler/src/fakes.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/zephyr/test/kingler/src/fakes.c b/zephyr/test/kingler/src/fakes.c
index 6c67447e88..c4a7cf0a6d 100644
--- a/zephyr/test/kingler/src/fakes.c
+++ b/zephyr/test/kingler/src/fakes.c
@@ -14,8 +14,11 @@ FAKE_VOID_FUNC(power_signal_interrupt, enum gpio_signal);
FAKE_VOID_FUNC(chipset_watchdog_interrupt, enum gpio_signal);
FAKE_VOID_FUNC(extpower_interrupt, enum gpio_signal);
FAKE_VOID_FUNC(switch_interrupt, enum gpio_signal);
-#ifndef CONFIG_TEST_KINGLER_USBC
+#if !(defined(CONFIG_TEST_KINGLER_USBC) || \
+ defined(CONFIG_TEST_DB_DETECTION_USB_COUNT))
FAKE_VOID_FUNC(xhci_interrupt, enum gpio_signal);
+#endif
+#ifndef CONFIG_TEST_KINGLER_USBC
FAKE_VOID_FUNC(lid_interrupt, enum gpio_signal);
FAKE_VOID_FUNC(usb_a0_interrupt, enum gpio_signal);
FAKE_VOID_FUNC(tcpc_alert_event, enum gpio_signal);