From 48312a797ace728cdd72015c313b428b2a336502 Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Thu, 15 Oct 2015 17:27:16 +0000 Subject: Revert "driver: bmi160: Reenable FIFO when EC wants it." This change introduces unnecessary power consumption in S3/S5. Given the EC does not need the data by itself - except for debugging with accelinfo/accelread commands - do not setup the FIFO if the AP does not need the data. BUG=chrome-os-partner:44229 This reverts commit ebf3934dc62a8d9c391dd0abf4998da42b1192e9. Change-Id: I3a38645b88dd031b7580cc06fd5e31606f99e36a Reviewed-on: https://chromium-review.googlesource.com/306180 Reviewed-by: Alec Berg Commit-Queue: Gwendal Grignou Tested-by: Gwendal Grignou --- driver/accelgyro_bmi160.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/driver/accelgyro_bmi160.c b/driver/accelgyro_bmi160.c index ea56d50ff9..1e645333a6 100644 --- a/driver/accelgyro_bmi160.c +++ b/driver/accelgyro_bmi160.c @@ -452,11 +452,8 @@ static int set_data_rate(const struct motion_sensor_t *s, #endif #ifdef CONFIG_ACCEL_FIFO - /* - * FIFO start collecting events. - * They will be discared if AP does not want them. - */ - enable_fifo(s, 1); + /* FIFO start collecting events if AP wants them */ + enable_fifo(s, !!BASE_ODR(s->config[SENSOR_CONFIG_AP].odr)); #endif accel_cleanup: -- cgit v1.2.1