summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2021-04-21 15:15:46 -0600
committerCommit Bot <commit-bot@chromium.org>2021-04-23 06:38:37 +0000
commit9d01265429449f7d0e23807b9381a505eebfb568 (patch)
treee737fa19cf57eb16eb502635aeccf9fdc5b14400
parent8f5e1b1a719606d253423e69c6518ece408bd114 (diff)
downloadchrome-ec-9d01265429449f7d0e23807b9381a505eebfb568.tar.gz
zephry: drivers: add KX022 driver support
Add the kionix driver via a CONFIG_ flag to the Zephyr build. BRANCH=none BUG=b:185966444 TEST=zmake testall Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I7cd41cb522c2f7963f9c5d3b2849ed973a230374 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2845557 Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--zephyr/CMakeLists.txt2
-rw-r--r--zephyr/Kconfig.sensor_devices6
2 files changed, 8 insertions, 0 deletions
diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt
index 7f0290afed..a0c03874d9 100644
--- a/zephyr/CMakeLists.txt
+++ b/zephyr/CMakeLists.txt
@@ -201,6 +201,8 @@ zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC "${PLATFORM_EC}/common/base32.c"
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_ACCEL_BMA255
"${PLATFORM_EC}/driver/accel_bma2x2.c"
"${PLATFORM_EC}/common/math_util.c")
+zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_ACCEL_KX022
+ "${PLATFORM_EC}/driver/accel_kionix.c")
zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_ACCELGYRO_BMI
"${PLATFORM_EC}/driver/accelgyro_bmi_common.c"
"${PLATFORM_EC}/common/math_util.c")
diff --git a/zephyr/Kconfig.sensor_devices b/zephyr/Kconfig.sensor_devices
index 5de06bb23a..d4415af9b4 100644
--- a/zephyr/Kconfig.sensor_devices
+++ b/zephyr/Kconfig.sensor_devices
@@ -26,6 +26,12 @@ config PLATFORM_EC_ACCEL_BMA255
Currently the driver supports BMA253, BMA255, BMA355, BMA280, BMA282,
BMA223, BMA254, BMA284, BMA250E, BMA222E, BMC150 BMC056, BMC156.
+config PLATFORM_EC_ACCEL_KX022
+ bool "KX022 Accelerometer Driver"
+ help
+ The driver supports Kionix's KX022 triaxial low-g acceleration sensor.
+ It allows measurements of acceleration in three perpendicular axes.
+
config PLATFORM_EC_ACCELGYRO_BMI160
bool "BMI160 Accelgyrometer Driver"
select PLATFORM_EC_ACCELGYRO_BMI