summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.sensor_devices
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/Kconfig.sensor_devices
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/Kconfig.sensor_devices')
-rw-r--r--zephyr/Kconfig.sensor_devices44
1 files changed, 30 insertions, 14 deletions
diff --git a/zephyr/Kconfig.sensor_devices b/zephyr/Kconfig.sensor_devices
index 4c477c2d76..a62a43d6c2 100644
--- a/zephyr/Kconfig.sensor_devices
+++ b/zephyr/Kconfig.sensor_devices
@@ -4,24 +4,40 @@
menu "Sensor Devices"
+config PLATFORM_EC_ACCELGYRO_ICM
+ bool "Config used to include common accelgyro ICM features"
+ help
+ Do not set this directly in a .conf file. This value should be set
+ using an `select` statement in other ICM family of drivers such as
+ ICM426XX.
+
config PLATFORM_EC_ACCEL_BMA255
- bool "BMA2X2 Accelerometer Family Driver"
- help
- The driver supports Bosch's a triaxial, low-g acceleration sensor.
- It allows measurements of acceleration in three perpendicular axes.
- Currently the driver supports BMA253, BMA255, BMA355, BMA280, BMA282,
- BMA223, BMA254, BMA284, BMA250E, BMA222E, BMC150 BMC056, BMC156.
+ bool "BMA2X2 Accelerometer Family Driver"
+ help
+ The driver supports Bosch's a triaxial, low-g acceleration sensor.
+ It allows measurements of acceleration in three perpendicular axes.
+ Currently the driver supports BMA253, BMA255, BMA355, BMA280, BMA282,
+ BMA223, BMA254, BMA284, BMA250E, BMA222E, BMC150 BMC056, BMC156.
config PLATFORM_EC_ACCELGYRO_BMI260
- bool "BMI260 Accelgyrometer Driver"
- help
- The driver supports Bosch's BMI260 which is an IMU consisting of
- a 16-bit tri-axial gyroscope and a 16-bit tri-axial accelerometer.
+ bool "BMI260 Accelgyrometer Driver"
+ help
+ The driver supports Bosch's BMI260 which is an IMU consisting of
+ a 16-bit tri-axial gyroscope and a 16-bit tri-axial accelerometer.
config PLATFORM_EC_ALS_TCS3400
- bool "TCS3400 Ambient Light Senseor Driver"
- help
- The driver supports TCS3400 which provides color and
- IR (red, green, blue, clear and IR) ambient light sensing.
+ bool "TCS3400 Ambient Light Senseor Driver"
+ help
+ The driver supports TCS3400 which provides color and
+ IR (red, green, blue, clear and IR) ambient light sensing.
+
+config PLATFORM_EC_ACCELGYRO_ICM426XX
+ bool "ICM426XX Accelgyro Driver"
+ select PLATFORM_EC_ACCELGYRO_ICM
+ help
+ The driver supports ICM425XX which provides both accelerometer and
+ gyroscope readings.
+
+rsource "Kconfig.accelgyro_icm"
endmenu # Sensor devices