summaryrefslogtreecommitdiff
path: root/zephyr/CMakeLists.txt
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2021-04-15 00:32:57 -0600
committerCommit Bot <commit-bot@chromium.org>2021-04-16 22:32:26 +0000
commit7ffc631e080dde6741580ecf217e9565ad791a71 (patch)
treec59ed3c07ed80d8af65b3d2740f5dc95e309d9ce /zephyr/CMakeLists.txt
parent1bfa6a7da4017b0c86d21cda2de70fb31d87ffc7 (diff)
downloadchrome-ec-7ffc631e080dde6741580ecf217e9565ad791a71.tar.gz
driver: icm: fix use of I2C_PORT_ACCEL
The ICM driver is currently using I2C_PORT_ACCEL incorrectly as a CONFIG_ value. Update the use cases to a new config option that selects between SPI and I2C communication specifically for the chip. To avoid a lot of device.h changes, the value of the config value is automatically inferred if not explicitly set. BRANCH=none BUG=b:185392974, b:146065507 TEST=zmake testall TEST=make buildall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I8b1a507a76031c2bb1aaf4ca7b14b92252a941f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2826920 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr/CMakeLists.txt')
-rw-r--r--zephyr/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt
index 43930cf139..ce47548d3b 100644
--- a/zephyr/CMakeLists.txt
+++ b/zephyr/CMakeLists.txt
@@ -205,6 +205,10 @@ zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_ACCELGYRO_BMI260
"${PLATFORM_EC}/driver/accelgyro_bmi_common.c"
"${PLATFORM_EC}/driver/accelgyro_bmi260.c"
"${PLATFORM_EC}/common/math_util.c")
+zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_ACCELGYRO_ICM
+ "${PLATFORM_EC}/driver/accelgyro_icm_common.c")
+zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_ACCELGYRO_ICM426XX
+ "${PLATFORM_EC}/driver/accelgyro_icm426xx.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_ACCEL_FIFO
"${PLATFORM_EC}/common/motion_sense_fifo.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_ADC_CMD