summaryrefslogtreecommitdiff
path: root/include/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/config.h')
-rw-r--r--include/config.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
index be61317550..71a5724cf7 100644
--- a/include/config.h
+++ b/include/config.h
@@ -132,6 +132,14 @@
#undef CONFIG_ACCELGYRO_ICM_COMM_SPI
#undef CONFIG_ACCELGYRO_ICM_COMM_I2C
+/* Select the communication mode for the accelgyro BMI. Only one of these should
+ * be set. To set the value manually, simply define one or the other. If neither
+ * is defined, but I2C_PORT_ACCEL is defined, then CONFIG_ACCELGYRO_BMI_I2C will
+ * automatically be set.
+ */
+#undef CONFIG_ACCELGYRO_BMI_COMM_SPI
+#undef CONFIG_ACCELGYRO_BMI_COMM_I2C
+
/*
* Some chips have a portion of memory which will remain powered even
* during a reset. This is called Always-On, or AON memory, and
@@ -6296,4 +6304,15 @@
* !CONFIG_ACCELGYRO_ICM_COMM_I2C
*/
+#if !defined(CONFIG_ZEPHYR) && !defined(CONFIG_ACCELGYRO_BMI_COMM_SPI) && \
+ !defined(CONFIG_ACCELGYRO_BMI_COMM_I2C)
+#ifdef I2C_PORT_ACCEL
+#define CONFIG_ACCELGYRO_BMI_COMM_I2C
+#else
+#define CONFIG_ACCELGYRO_BMI_COMM_SPI
+#endif
+#endif /* !CONFIG_ZEPHYR && !CONFIG_ACCELGYRO_BMI_SPI && \
+ * !CONFIG_ACCELGYRO_BMI_I2C
+ */
+
#endif /* __CROS_EC_CONFIG_H */