diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2015-10-15 17:27:16 +0000 |
---|---|---|
committer | ChromeOS bot <3su6n15k.default@developer.gserviceaccount.com> | 2015-10-15 18:16:24 +0000 |
commit | 48312a797ace728cdd72015c313b428b2a336502 (patch) | |
tree | baeb40a2e6716b418d34519cd26b5639b3f627aa | |
parent | ff2f82864305f17cb1c297c4aff68a1b79f8dec4 (diff) | |
download | chrome-ec-48312a797ace728cdd72015c313b428b2a336502.tar.gz |
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 <alecaberg@chromium.org>
Commit-Queue: Gwendal Grignou <gwendal@chromium.org>
Tested-by: Gwendal Grignou <gwendal@chromium.org>
-rw-r--r-- | driver/accelgyro_bmi160.c | 7 |
1 files 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: |