diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2015-09-23 10:45:02 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-09-24 18:06:58 -0700 |
commit | 324d6b807f18c456c16dad534f88ef22da34fdc5 (patch) | |
tree | dde0d91630da3ea9bc0d6029fc8b4625ea8ad84d | |
parent | 5d138b379db251f27bd741e97119a30ba16acee1 (diff) | |
download | chrome-ec-324d6b807f18c456c16dad534f88ef22da34fdc5.tar.gz |
driver: bmi160: Reenable FIFO when EC wants it.
Code has been added to not send data to AP ring when the
AP does not want data, but we should still enable the BMI160 FIFO if the
EC wants the data.
BRANCH=smaug
BUG=chromium:513458
TEST=Disable sensor at AP (sysfs frequency) enable in EC (accelrate).
Check with accelinfo we are collecting sensor info.
Change-Id: I962fecad0e8cea899e4d788d25982e8bc7e7fb88
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/301795
Reviewed-by: Alec Berg <alecaberg@chromium.org>
-rw-r--r-- | driver/accelgyro_bmi160.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/driver/accelgyro_bmi160.c b/driver/accelgyro_bmi160.c index 68259cefaf..650620af9f 100644 --- a/driver/accelgyro_bmi160.c +++ b/driver/accelgyro_bmi160.c @@ -431,8 +431,11 @@ static int set_data_rate(const struct motion_sensor_t *s, data->odr = normalized_rate; #ifdef CONFIG_ACCEL_FIFO - /* FIFO start collecting events if AP wants them */ - enable_fifo(s, !!BASE_ODR(s->config[SENSOR_CONFIG_AP].odr)); + /* + * FIFO start collecting events. + * They will be discared if AP does not want them. + */ + enable_fifo(s, 1); #endif accel_cleanup: |