diff options
author | Paul Ma <magf@bitland.corp-partner.google.com> | 2018-06-28 16:30:19 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-06-30 17:21:23 -0700 |
commit | b57a18629cbed1d72719a8a5b5047803edb46d0e (patch) | |
tree | f037947903073395538d099be95d5a160d059430 /driver/stm_mems_common.c | |
parent | c81a0dcf976e57f8bf14dd2ffcf8897c80988a31 (diff) | |
download | chrome-ec-b57a18629cbed1d72719a8a5b5047803edb46d0e.tar.gz |
phaser: add new lis2de chip type
Add new motion sense chip type MOTIONSENSE_CHIP_LIS2DE and make
ectool support it. also use +/- 2g range for lis2de to get one
extra bit of precision.
BRANCH=none
BUG=b:110604678
TEST=boot phaser360 board, run 'ectool motionsense info 0'
Change-Id: Idd8a797e5a8b38efcd0a4ac47eb584534106fb86
Signed-off-by: Paul Ma <magf@bitland.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/1118094
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'driver/stm_mems_common.c')
-rw-r--r-- | driver/stm_mems_common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/driver/stm_mems_common.c b/driver/stm_mems_common.c index 427fc8091f..b3fe4d94fb 100644 --- a/driver/stm_mems_common.c +++ b/driver/stm_mems_common.c @@ -134,7 +134,8 @@ void st_normalize(const struct motion_sensor_t *s, vector_3_t v, uint8_t *data) { int i, range; struct stprivate_data *drvdata = s->drv_data; - /* data is left-aligned and the bottom bits need to be + /* + * Data is left-aligned and the bottom bits need to be * cleared because they may contain trash data. */ uint16_t mask = ~((1 << (16 - drvdata->resol)) - 1); |