summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2016-08-24 01:14:51 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-08-25 21:59:14 -0700
commit98ec487dff024808927c05b13bfc520893cf1437 (patch)
treeea853e68308a032101088c5cb780a07c7000a12b
parent608852b84098cebdda1fd3c1016ec30d3890ccb3 (diff)
downloadchrome-ec-98ec487dff024808927c05b13bfc520893cf1437.tar.gz
kevin: Set Forced Mode for lid accel only
Addition to 4523735d: We can use the BMI160 internal FIFO, so set only the Lid accel in forced mode. Set EC rate for BMI160 accel as needed. BRANCH=kevin BUG=b:27849483 TEST=Check sensor parameters with accelrate. Check rotation is working. Change-Id: I86f50e019db25837894036c4f27b255a65d2f894 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/374918 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--board/kevin/board.c2
-rw-r--r--board/kevin/board.h6
2 files changed, 3 insertions, 5 deletions
diff --git a/board/kevin/board.c b/board/kevin/board.c
index dfcfc6aa97..184b3cf1a9 100644
--- a/board/kevin/board.c
+++ b/board/kevin/board.c
@@ -470,7 +470,7 @@ struct motion_sensor_t motion_sensors[] = {
/* EC use accel for angle detection */
[SENSOR_CONFIG_EC_S0] = {
.odr = 10000 | ROUND_UP_FLAG,
- .ec_rate = 0,
+ .ec_rate = 100 * MSEC,
},
/* Sensor off in S3/S5 */
[SENSOR_CONFIG_EC_S3] = {
diff --git a/board/kevin/board.h b/board/kevin/board.h
index b97519a5ef..43fe50b6c3 100644
--- a/board/kevin/board.h
+++ b/board/kevin/board.h
@@ -85,11 +85,9 @@
#define CONFIG_ACCEL_FIFO_THRES (CONFIG_ACCEL_FIFO / 3)
/*
- * Sensor internal FIFO are not enabled, we need to poll at
- * every data point.
+ * Sensor internal FIFO is enabled for BMI160, but not for BMA255.
*/
-#define CONFIG_ACCEL_FORCE_MODE_MASK \
- ((1 << BASE_ACCEL) | (1 << BASE_GYRO) | (1 << LID_ACCEL))
+#define CONFIG_ACCEL_FORCE_MODE_MASK (1 << LID_ACCEL)
/* USB PD config */
#define CONFIG_CASE_CLOSED_DEBUG_EXTERNAL