summaryrefslogtreecommitdiff
path: root/zephyr
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2022-11-17 13:38:10 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-11-18 20:47:10 +0000
commit5b3578dbff19ca2166e6f7303f069ac1b4dd0be3 (patch)
tree33fdbceaff72015a158e542089d7d2294c427a9f /zephyr
parentede61d51be526389bef177cbcd9b25a96743a6f4 (diff)
downloadchrome-ec-5b3578dbff19ca2166e6f7303f069ac1b4dd0be3.tar.gz
test: move BC1.2 driver from default testcase
Move the BC1.2 test from the default testcase into the PI3USB9201 testcase. The BC1.2 test is tightly coupled with the PIUSB9201 driver and emulator. BUG=none BRANCH=none TEST=twister Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I79bbfd11ac84cf1a8554daa8c77ad4fa3c5b2631 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4038049 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
Diffstat (limited to 'zephyr')
-rw-r--r--zephyr/test/drivers/bc12_pi3usb9201/CMakeLists.txt3
-rw-r--r--zephyr/test/drivers/bc12_pi3usb9201/src/pi3usb9201.c (renamed from zephyr/test/drivers/default/src/bc12.c)0
-rw-r--r--zephyr/test/drivers/bc12_pi3usb9201/src/pi3usb9201_interrupt.c (renamed from zephyr/test/drivers/bc12_pi3usb9201/src/main.c)0
-rw-r--r--zephyr/test/drivers/common/include/test/drivers/utils.h6
-rw-r--r--zephyr/test/drivers/default/CMakeLists.txt1
5 files changed, 7 insertions, 3 deletions
diff --git a/zephyr/test/drivers/bc12_pi3usb9201/CMakeLists.txt b/zephyr/test/drivers/bc12_pi3usb9201/CMakeLists.txt
index 842a514e16..2f1925b635 100644
--- a/zephyr/test/drivers/bc12_pi3usb9201/CMakeLists.txt
+++ b/zephyr/test/drivers/bc12_pi3usb9201/CMakeLists.txt
@@ -2,4 +2,5 @@
#Use of this source code is governed by a BSD-style license that can be
#found in the LICENSE file.
-target_sources(app PRIVATE src/main.c)
+target_sources(app PRIVATE src/pi3usb9201.c)
+target_sources(app PRIVATE src/pi3usb9201_interrupt.c)
diff --git a/zephyr/test/drivers/default/src/bc12.c b/zephyr/test/drivers/bc12_pi3usb9201/src/pi3usb9201.c
index 5d143dcbdb..5d143dcbdb 100644
--- a/zephyr/test/drivers/default/src/bc12.c
+++ b/zephyr/test/drivers/bc12_pi3usb9201/src/pi3usb9201.c
diff --git a/zephyr/test/drivers/bc12_pi3usb9201/src/main.c b/zephyr/test/drivers/bc12_pi3usb9201/src/pi3usb9201_interrupt.c
index b2c69c712a..b2c69c712a 100644
--- a/zephyr/test/drivers/bc12_pi3usb9201/src/main.c
+++ b/zephyr/test/drivers/bc12_pi3usb9201/src/pi3usb9201_interrupt.c
diff --git a/zephyr/test/drivers/common/include/test/drivers/utils.h b/zephyr/test/drivers/common/include/test/drivers/utils.h
index d2e0b06a5d..7be7dd5400 100644
--- a/zephyr/test/drivers/common/include/test/drivers/utils.h
+++ b/zephyr/test/drivers/common/include/test/drivers/utils.h
@@ -593,7 +593,11 @@ static inline void set_ac_enabled(bool enabled)
zassert_ok(gpio_emul_input_set(acok_dev, GPIO_ACOK_OD_PIN, enabled),
NULL);
- k_sleep(K_MSEC(CONFIG_EXTPOWER_DEBOUNCE_MS + 1));
+ /*
+ * b/253284635 - Sleep for a full second past the debounce time
+ * to ensure the power button debounce logic runs.
+ */
+ k_sleep(K_MSEC(CONFIG_EXTPOWER_DEBOUNCE_MS + 1000));
zassert_equal(enabled, extpower_is_present(), NULL);
}
diff --git a/zephyr/test/drivers/default/CMakeLists.txt b/zephyr/test/drivers/default/CMakeLists.txt
index 16b9aad4b6..d7396ad159 100644
--- a/zephyr/test/drivers/default/CMakeLists.txt
+++ b/zephyr/test/drivers/default/CMakeLists.txt
@@ -1,7 +1,6 @@
target_sources(app PRIVATE
src/battery.c
src/bb_retimer.c
- src/bc12.c
src/bma2x2.c
src/bmi_common.c
src/bmi160.c