summaryrefslogtreecommitdiff
path: root/include/config.h
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2019-01-31 13:43:04 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-03-11 19:53:06 -0700
commit554ba87174803e1ae52165ad46b9b22500b1ebb8 (patch)
treeda013d28d7da998255c11cbc120ca549c548a69b /include/config.h
parent31fb76dc641dfdcdbde2fd6447168967d6c5c1c2 (diff)
downloadchrome-ec-554ba87174803e1ae52165ad46b9b22500b1ebb8.tar.gz
driver: lis2dh: Add support for lng2dm
Looking at 4.19 kernel (drivers/iio/accel/st_accel_core.c), LNG2DM has the same interface as LIS2DH but a resolution of 8 bits only. In consequence, basic handling of LIS2DE and LNG2DM should be identical. FIFO and interrupt are not supported. BUG=b:122281217 BRANCH=none TEST=TBD Change-Id: I7b715cfccdaf147dcdc002e9be8f5231a3dd8f98 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1449112 Reviewed-by: Mathew King <mathewk@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'include/config.h')
-rw-r--r--include/config.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/include/config.h b/include/config.h
index 5a84742a4b..9ff7306a76 100644
--- a/include/config.h
+++ b/include/config.h
@@ -65,16 +65,18 @@
#undef CONFIG_ACCEL_KXCJ9
#undef CONFIG_ACCEL_KX022
/*
- * lis2dh and lis2de have the same register interface but different
+ * lis2dh/lis2de/lng2dm have the same register interface but different
* supported resolution. In normal mode, lis2dh works in 10-bit resolution,
- * but lis2de only supports 8bit resolution.
- * define CONFIG_ACCEL_LIS2DH if using lis2dh chip on the board and define
- * CONFIG_ACCEL_LIS2DE if using lis2de chip. CONFIG_ACCEL_LIS2D_COMMON get
- * automatically defined if either of them get defined.
+ * but lis2de/lng2dm only support 8bit resolution.
+ *
+ * Use the define for your correct chip and the CONFIG_ACCEL_LIS2D_COMMON will
+ * automatically get defined.
*/
-#undef CONFIG_ACCEL_LIS2DH
#undef CONFIG_ACCEL_LIS2DE
+#undef CONFIG_ACCEL_LIS2DH
+#undef CONFIG_ACCEL_LNG2DM
#undef CONFIG_ACCEL_LIS2D_COMMON
+
#undef CONFIG_ACCELGYRO_BMI160
#undef CONFIG_ACCELGYRO_LSM6DS0
/* Use CONFIG_ACCELGYRO_LSM6DSM for LSM6DSL, LSM6DSM, and/or LSM6DS3 */
@@ -4232,10 +4234,11 @@
/*****************************************************************************/
/*
- * Automatically define CONFIG_ACCEL_LIS2D_COMMON if either child option is
- * defined.
+ * Automatically define CONFIG_ACCEL_LIS2D_COMMON if a child option is defined.
*/
-#if defined(CONFIG_ACCEL_LIS2DH) || defined(CONFIG_ACCEL_LIS2DE)
+#if defined(CONFIG_ACCEL_LIS2DH) || \
+ defined(CONFIG_ACCEL_LIS2DE) || \
+ defined(CONFIG_ACCEL_LNG2DM)
#define CONFIG_ACCEL_LIS2D_COMMON
#endif