summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorPaul Ma <magf@bitland.corp-partner.google.com>2018-06-28 16:30:19 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-06-30 17:21:23 -0700
commitb57a18629cbed1d72719a8a5b5047803edb46d0e (patch)
treef037947903073395538d099be95d5a160d059430 /board
parentc81a0dcf976e57f8bf14dd2ffcf8897c80988a31 (diff)
downloadchrome-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 'board')
-rw-r--r--board/phaser/board.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/board/phaser/board.c b/board/phaser/board.c
index 092c30c40a..461558f5df 100644
--- a/board/phaser/board.c
+++ b/board/phaser/board.c
@@ -128,7 +128,7 @@ struct motion_sensor_t motion_sensors[] = {
[LID_ACCEL] = {
.name = "Lid Accel",
.active_mask = SENSOR_ACTIVE_S0_S3,
- .chip = MOTIONSENSE_CHIP_LIS2DH,
+ .chip = MOTIONSENSE_CHIP_LIS2DE,
.type = MOTIONSENSE_TYPE_ACCEL,
.location = MOTIONSENSE_LOC_LID,
.drv = &lis2dh_drv,
@@ -137,7 +137,8 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_SENSOR,
.addr = LIS2DH_ADDR1,
.rot_standard_ref = &standard_rot_ref,
- .default_range = 4, /* g */
+ /* We only use 2g because its resolution is only 8-bits */
+ .default_range = 2, /* g */
.min_frequency = LIS2DH_ODR_MIN_VAL,
.max_frequency = LIS2DH_ODR_MAX_VAL,
.config = {