diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2015-10-14 21:36:29 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-10-15 21:40:37 -0700 |
commit | 917effebbf4f64607a94b10490c143817bf10801 (patch) | |
tree | fcaf9c61902689d7018bc3aab64ff37c8a3f1ddb /board | |
parent | 3fa05020369579459898dd1d822f9a8a07ac3751 (diff) | |
download | chrome-ec-917effebbf4f64607a94b10490c143817bf10801.tar.gz |
common: motion: Fix forced mode computation
When the sensor is defined to be used in forced mode, ec rate was not
calculated properly: if the AP rate was rounded up, ec_rate requested by
the AP would always be 0. If the EC rate is 0, the sensor may potientally
never be queried.
Also, when the sensor was disable for a long time, the last timestamp of
collection may appear to be in the future, so collection was not
initiated. (long time more than 35 minutes, less than 71 minutes).
We still see instance where the sensor seems locked up.
accelinit would not help because the state machine was not reseted, fix
that.
BRANCH=smaug
BUG=chrome-os-partner:45627
TEST=With accelerate 3/4, check the value is now correct.
Check proximity sensor is not stuck 45 minutes after last collection.
Change-Id: Ia6805b75f67b048cb0b42c0f91a73dfaf94a254f
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/305823
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/ryu/board.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/board/ryu/board.c b/board/ryu/board.c index 073e6cfab0..02e9ed0191 100644 --- a/board/ryu/board.c +++ b/board/ryu/board.c @@ -405,7 +405,7 @@ struct motion_sensor_t motion_sensors[] = { /* EC needs sensor for light adaptive brightness */ [SENSOR_CONFIG_EC_S0] = { .odr = 1000, - .ec_rate = 1000, + .ec_rate = 0, }, [SENSOR_CONFIG_EC_S3] = { .odr = 1000, |