summaryrefslogtreecommitdiff
path: root/include/config.h
diff options
context:
space:
mode:
authorNick Vaccaro <nvaccaro@chromium.org>2017-05-26 12:29:14 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-08-08 17:34:11 -0700
commite656b970e204309c1a665f154a5972ed85305911 (patch)
tree58ed84ec4144caf71a4953bae780ec60dd62037e /include/config.h
parent8bfde69fdd9b5feb4c47c8c714416c17afe00f78 (diff)
downloadchrome-ec-e656b970e204309c1a665f154a5972ed85305911.tar.gz
sensors: add bmi160 & kionix orientation driver
BRANCH=none BUG=chromium:718919 TEST=make buildall -j works, orientation works when enabled on gru and scarlet. Change-Id: I16dcfa5d9dea39c082d98190fa1bb6e496168b17 Signed-off-by: Nick Vaccaro <nvaccaro@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/540124 Tested-by: Nick Vaccaro <nvaccaro@google.com> Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Diffstat (limited to 'include/config.h')
-rw-r--r--include/config.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
index b557b7b8be..ee4ebf0967 100644
--- a/include/config.h
+++ b/include/config.h
@@ -69,6 +69,21 @@
#undef CONFIG_ACCELGYRO_BMI160
#undef CONFIG_ACCELGYRO_LSM6DSM
+/* Support for BMI160 hardware orientation sensor */
+#undef CONFIG_BMI160_ORIENTATION_SENSOR
+
+/* Support for KIONIX KX022 hardware orientation sensor */
+#undef CONFIG_KX022_ORIENTATION_SENSOR
+
+/*
+ * Define if either CONFIG_BMI160_ORIENTATION_SUPPORT or
+ * CONFIG_KX022_ORIENTATION_SUPPORT is set.
+ */
+#undef CONFIG_ORIENTATION_SENSOR
+
+/* Support the orientation gesture */
+#undef CONFIG_GESTURE_ORIENTATION
+
/* Specify barometer attached */
#undef CONFIG_BARO_BMP280
@@ -943,6 +958,12 @@
*/
#define CONFIG_DEBUG_EXCEPTIONS
+/*
+ * Print orientation when device orientation changes
+ * (requires CONFIG_SENSOR_ORIENTATION)
+ */
+#undef CONFIG_DEBUG_ORIENTATION
+
/* Support Synchronous UART debug printf. */
#undef CONFIG_DEBUG_PRINTF
@@ -2916,6 +2937,16 @@
#define CONFIG_MKBP_EVENT
#endif
+/******************************************************************************/
+/* Set generic orientation config if a specific orientation config is set. */
+#if defined(CONFIG_KX022_ORIENTATION_SENSOR) || \
+ defined(CONFIG_BMI160_ORIENTATION_SENSOR)
+#ifndef CONFIG_ACCEL_FIFO
+#error CONFIG_ACCEL_FIFO must be defined to use hw orientation sensor support
+#endif
+#define CONFIG_ORIENTATION_SENSOR
+#endif
+
/*****************************************************************************/
/*
* Handle task-dependent configs.