summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2020-11-11 10:40:54 -0700
committerCommit Bot <commit-bot@chromium.org>2020-11-16 04:27:33 +0000
commit7bb5568c04011aecdeda2e55a0ca69443d497e3b (patch)
tree53db6b94f30c31af144762387496510897e559e9
parentc395f794401b20dbca7e7e9b6989d1403744c292 (diff)
downloadchrome-ec-7bb5568c04011aecdeda2e55a0ca69443d497e3b.tar.gz
Zephyr: Migrate i2c implementation to chip family specific file
This change simply moves the i2c.c shim to i2c-npcx7.c. BRANCH=none BUG=none TEST=builds with zmake for volteer Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: Ic410787dcf2693dda71681f739c0b74cd47770da Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2532964 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
-rw-r--r--zephyr/shim/chip/npcx/CMakeLists.txt3
-rw-r--r--zephyr/shim/chip/npcx/i2c-npcx7.c (renamed from zephyr/shim/chip/npcx/i2c.c)0
2 files changed, 2 insertions, 1 deletions
diff --git a/zephyr/shim/chip/npcx/CMakeLists.txt b/zephyr/shim/chip/npcx/CMakeLists.txt
index 377cb652b4..d464cc3e0b 100644
--- a/zephyr/shim/chip/npcx/CMakeLists.txt
+++ b/zephyr/shim/chip/npcx/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.
-zephyr_sources(i2c.c)
+string(TOLOWER "i2c-${CHIP_FAMILY}.c" chip_specific_i2c_shim)
+zephyr_sources(${chip_specific_i2c_shim})
diff --git a/zephyr/shim/chip/npcx/i2c.c b/zephyr/shim/chip/npcx/i2c-npcx7.c
index 1f6fe6336d..1f6fe6336d 100644
--- a/zephyr/shim/chip/npcx/i2c.c
+++ b/zephyr/shim/chip/npcx/i2c-npcx7.c