summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2021-07-09 14:28:25 -0600
committerCommit Bot <commit-bot@chromium.org>2021-07-12 15:42:03 +0000
commitc8c4df352b969b736faa411a75dbbfd96c5824f7 (patch)
tree6f836bea345068d9f28c8889b46d7818cb75f90b
parent97b049d99fafb5c608fe302dcf5e65f7659c15fb (diff)
downloadchrome-ec-c8c4df352b969b736faa411a75dbbfd96c5824f7.tar.gz
zephyr: add InvenSense sensors
Add Kconfig options for the InvenSense sensor drivers ICM426xx and ICM42607. This also creates config option for CONFIG_ACCELGYRO_ICM42607 which was missed when the driver was first created (CL:2822268). BUG=b:193195946 BRANCH=none TEST=zmake testall TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I422071e749ee2e8ed3ac1997aa886ee78395d37e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3015867 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
-rw-r--r--include/config.h1
-rw-r--r--util/config_allowed.txt1
-rw-r--r--zephyr/Kconfig.sensor_devices7
-rw-r--r--zephyr/shim/include/config_chip.h10
4 files changed, 19 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
index 6388c27eed..32ba1b71aa 100644
--- a/include/config.h
+++ b/include/config.h
@@ -122,6 +122,7 @@
#undef CONFIG_ACCELGYRO_BMI260
#undef CONFIG_ACCELGYRO_BMI3XX
#undef CONFIG_ACCELGYRO_ICM426XX
+#undef CONFIG_ACCELGYRO_ICM42607
#undef CONFIG_ACCELGYRO_LSM6DS0
/* Use CONFIG_ACCELGYRO_LSM6DSM for LSM6DSL, LSM6DSM, and/or LSM6DS3 */
#undef CONFIG_ACCELGYRO_LSM6DSM
diff --git a/util/config_allowed.txt b/util/config_allowed.txt
index c1c379cabb..5e17aa7185 100644
--- a/util/config_allowed.txt
+++ b/util/config_allowed.txt
@@ -4,6 +4,7 @@ CONFIG_ACCELGYRO_BMI160_INT2_OUTPUT
CONFIG_ACCELGYRO_BMI160_INT_EVENT
CONFIG_ACCELGYRO_BMI260_INT2_OUTPUT
CONFIG_ACCELGYRO_BMI260_INT_EVENT
+CONFIG_ACCELGYRO_ICM42607_INT_EVENT
CONFIG_ACCELGYRO_ICM426XX_INT_EVENT
CONFIG_ACCELGYRO_LSM6DS0
CONFIG_ACCELGYRO_LSM6DSM
diff --git a/zephyr/Kconfig.sensor_devices b/zephyr/Kconfig.sensor_devices
index 1fcd8b35d8..623919d775 100644
--- a/zephyr/Kconfig.sensor_devices
+++ b/zephyr/Kconfig.sensor_devices
@@ -91,6 +91,13 @@ config PLATFORM_EC_ACCELGYRO_ICM426XX
The driver supports ICM425XX which provides both accelerometer and
gyroscope readings.
+config PLATFORM_EC_ACCELGYRO_ICM42607
+ bool "ICM42607 Accelgyro Driver"
+ select PLATFORM_EC_ACCELGYRO_ICM
+ help
+ The driver supports ICM42607 which provides both accelerometer and
+ gyroscope readings.
+
config PLATFORM_EC_STM_MEMS_COMMON
bool
help
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index acd8780765..d1c8672092 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -1312,6 +1312,16 @@
#define CONFIG_ALS_TCS3400
#endif
+#undef CONFIG_ACCELGYRO_ICM426XX
+#ifdef CONFIG_PLATFORM_EC_ACCELGYRO_ICM426XX
+#define CONFIG_ACCELGYRO_ICM426XX
+#endif
+
+#undef CONFIG_ACCELGYRO_ICM42607
+#ifdef CONFIG_PLATFORM_EC_ACCELGYRO_ICM42607
+#define CONFIG_ACCELGYRO_ICM42607
+#endif
+
#endif /* CONFIG_PLATFORM_EC_MOTIONSENSE */
#undef CONFIG_HOSTCMD_GET_UPTIME_INFO