From 8db50ce410cd71a6b4429fb91a3be9e103312f8f Mon Sep 17 00:00:00 2001 From: Mario Tesi Date: Fri, 18 Nov 2016 09:48:42 +0100 Subject: driver: accel: Add acc driver basics and FIFO for LIS2DH/LIS2DH12 Add driver for acc sensor ST lis2dh/lis2dh12 Support interrupt management for FIFO watermark Starting to share common code with other devices like lsm6dsm/lsm6dsl (acc/gyro) or new lis2mdl (mag) TODO: Add all embedded functions support (click, tap and so on) BUG=none BRANCH=master TEST=Tested on discovery BOARD with sensor connected on EC i2c master bus. Added motion sense task on discovery board task list, added gpio info in board configuration file and tested with motion sense console commands. Data for acc seems ok: can successfully change ODR and full scale range. Also FIFO and interrupt tested Device tested is lis2dh (lis2dh12 simply differs for low pin count but share the same registers) Change-Id: I16abeac3f139a604094b38d8d8b857a62c93a242 Signed-off-by: Mario Tesi Reviewed-on: https://chromium-review.googlesource.com/412700 Commit-Ready: mario tesi Tested-by: mario tesi Reviewed-by: Gwendal Grignou --- common/build.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'common') diff --git a/common/build.mk b/common/build.mk index 6ccd800753..ca2da65de7 100644 --- a/common/build.mk +++ b/common/build.mk @@ -13,6 +13,7 @@ common-$(CONFIG_ACCELGYRO_BMA255)+=math_util.o common-$(CONFIG_ACCELGYRO_BMI160)+=math_util.o common-$(CONFIG_ACCELGYRO_LSM6DS0)+=math_util.o common-$(CONFIG_ACCELGYRO_LSM6DSM)+=math_util.o +common-$(CONFIG_ACCEL_LIS2DH)+=math_util.o common-$(CONFIG_ACCEL_KXCJ9)+=math_util.o common-$(CONFIG_ACCEL_KX022)+=math_util.o common-$(CONFIG_ADC)+=adc.o -- cgit v1.2.1