diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2018-09-04 10:33:21 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2018-10-04 22:25:54 +0000 |
commit | 4f97fff8a0604a7ee5cdb23ff9365f0ac37bcbd9 (patch) | |
tree | 8c179d5bfc522ca18474fecb1a9bc4b4a191ffc1 /include/motion_sense.h | |
parent | e4eea88b3c24058a380a3acbfaf33fc0a1a96ee9 (diff) | |
download | chrome-ec-4f97fff8a0604a7ee5cdb23ff9365f0ac37bcbd9.tar.gz |
motion: Change ODR only within the motion sensor task
When changing ODR for one sensor, we insert a timestamp in the FIFO.
That timestamp can be misinterpreted by other sensor while in batch
mode, condensing all events in a small timezone.
Also, it can lead the motionsense stack to insert timestamp from the
past.
BUG=b:111422556,chromium:562245
TEST=Check cheets_CTS_P.9.0_r2.x86.CtsSensorTestCases pass on eve.
BRANCH=eve
Change-Id: If76aa3abcedbe463321ccbb1c183dc16edda8693
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1204692
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
(cherry picked from commit f62f2ebbecb131956a5edc4bf60c094bc67972a1)
Reviewed-on: https://chromium-review.googlesource.com/c/1259383
Reviewed-by: Philip Chen <philipchen@chromium.org>
Commit-Queue: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Trybot-Ready: Philip Chen <philipchen@chromium.org>
Diffstat (limited to 'include/motion_sense.h')
-rw-r--r-- | include/motion_sense.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/motion_sense.h b/include/motion_sense.h index 9d727a62de..7b574e37f7 100644 --- a/include/motion_sense.h +++ b/include/motion_sense.h @@ -125,6 +125,9 @@ struct motion_sensor_t { /* How many flush events are pending */ uint32_t flush_pending; + /* new ODR pending */ + uint32_t new_odr; + /* * Allow EC to request an higher frequency for the sensors than the AP. * We will downsample according to oversampling_ratio, or ignore the |