summaryrefslogtreecommitdiff
path: root/zephyr/test/i2c
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 /zephyr/test/i2c
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-252457d4b21f46889eebad61d4c0a65331919cec.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 'zephyr/test/i2c')
-rw-r--r--zephyr/test/i2c/CMakeLists.txt9
-rw-r--r--zephyr/test/i2c/overlay.dts23
-rw-r--r--zephyr/test/i2c/prj.conf22
-rw-r--r--zephyr/test/i2c/src/main.c34
-rw-r--r--zephyr/test/i2c/zmake.yaml14
5 files changed, 0 insertions, 102 deletions
diff --git a/zephyr/test/i2c/CMakeLists.txt b/zephyr/test/i2c/CMakeLists.txt
deleted file mode 100644
index 214177013f..0000000000
--- a/zephyr/test/i2c/CMakeLists.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-# Copyright 2020 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.
-
-cmake_minimum_required(VERSION 3.13.1)
-find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
-project(i2c)
-
-target_sources(app PRIVATE src/main.c)
diff --git a/zephyr/test/i2c/overlay.dts b/zephyr/test/i2c/overlay.dts
deleted file mode 100644
index 2c56ee3b7a..0000000000
--- a/zephyr/test/i2c/overlay.dts
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Copyright 2020 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.
- */
-
-/ {
- named-i2c-ports {
- compatible = "named-i2c-ports";
- accel-0 {
- i2c-port = <&bmi_i2c>;
- enum-name = "I2C_PORT_ACCEL";
- label = "ACCEL_0";
- };
- };
-};
-
-&i2c0 {
- bmi_i2c: bmi@68 {
- compatible = "bosch,bmi160";
- reg = <0x68>;
- label = "accel-i2c";
- };
-};
diff --git a/zephyr/test/i2c/prj.conf b/zephyr/test/i2c/prj.conf
deleted file mode 100644
index 8023c0492b..0000000000
--- a/zephyr/test/i2c/prj.conf
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 2020 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.
-
-CONFIG_ZTEST=y
-CONFIG_LOG=y
-
-CONFIG_EMUL=y
-CONFIG_I2C=y
-CONFIG_I2C_EMUL=y
-CONFIG_BMI160=y
-CONFIG_EMUL_BMI160=y
-CONFIG_SENSOR=y
-CONFIG_BMI160_TRIGGER_NONE=y
-
-CONFIG_PLATFORM_EC=y
-CONFIG_PLATFORM_EC_I2C=y
-CONFIG_CROS_EC=y
-
-# TODO(b/173711210) figure out why SPI is required here when we're not using it.
-CONFIG_SPI=y
-CONFIG_SPI_EMUL=y
diff --git a/zephyr/test/i2c/src/main.c b/zephyr/test/i2c/src/main.c
deleted file mode 100644
index 064ce78816..0000000000
--- a/zephyr/test/i2c/src/main.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright 2020 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.
- */
-
-#include <devicetree.h>
-#include <ztest.h>
-
-#include "common.h"
-#include "i2c/i2c.h"
-
-/* Unused: required for shimming i2c. */
-void watchdog_reload(void)
-{
-}
-
-static void test_i2c_port_count(void)
-{
- zassert_equal(NAMED_I2C(accel_0), 0,
- "accel_0 expected to be 0 but was %d",
- NAMED_I2C(accel_0));
- zassert_equal(I2C_PORT_COUNT, 1,
- "I2C_PORT_COUNT expected to be 1 but was %d",
- I2C_PORT_COUNT);
-}
-
-/* Test case main entry. */
-void test_main(void)
-{
- ztest_test_suite(test_i2c,
- ztest_user_unit_test(test_i2c_port_count));
- ztest_run_test_suite(test_i2c);
-}
-
diff --git a/zephyr/test/i2c/zmake.yaml b/zephyr/test/i2c/zmake.yaml
deleted file mode 100644
index f5e794c0f8..0000000000
--- a/zephyr/test/i2c/zmake.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright 2020 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.
-
-board: native_posix
-supported-zephyr-versions:
- - v2.6
-supported-toolchains:
- - llvm
- - host
-output-type: elf
-is-test: true
-dts-overlays:
- - overlay.dts