diff options
author | Yuval Peress <peress@chromium.org> | 2019-10-16 11:41:00 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-01-11 02:38:36 +0000 |
commit | 43d35e28ae67077797b0f6bc4cfd6afe2ce0e70a (patch) | |
tree | 7e268e06c9b777a3296a2784c9bc09204e26ee09 /common/motion_sense.c | |
parent | f11df7732d4d4bfdc9b25441be5af3d5ba569cad (diff) | |
download | chrome-ec-43d35e28ae67077797b0f6bc4cfd6afe2ce0e70a.tar.gz |
common: motion_sense_fifo: Read temperature on stage
Assuming online calibration is enabled, and the driver implements
the get_temp function. When a driver stages data, if this is the
first staged sample, read the current internal sensor temperature
and cache it (will later be used in commit_data()).
BUG=b:138303429,chromium:1023858
BRANCH=None
TEST=buildall
Change-Id: I8e5404e628d3e8ded7c2d75b1b5cbac8166e97aa
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1867225
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'common/motion_sense.c')
-rw-r--r-- | common/motion_sense.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/motion_sense.c b/common/motion_sense.c index 95ac60145f..bcff40d2cb 100644 --- a/common/motion_sense.c +++ b/common/motion_sense.c @@ -845,8 +845,10 @@ void motion_sense_task(void *u) set_present(lpc_status); #endif - if (IS_ENABLED(CONFIG_ACCEL_FIFO)) + if (IS_ENABLED(CONFIG_ACCEL_FIFO)) { + motion_sense_fifo_init(); ts_last_int = get_time(); + } while (1) { ts_begin_task = get_time(); |