From e013aaa016fd883a6ac545c851ecb1f5b1e60874 Mon Sep 17 00:00:00 2001 From: Paul Ma Date: Fri, 22 Jun 2018 18:11:04 +0800 Subject: phaser: fix lis2de resolution and sensor value output lis2de only support 8-bit resolution. This is what is different from lis2dh. This patch add two defines (CONFIG_ACCEL_LIS2DH and CONFIG_ACCEL_LIS2DE) to defferientiate them. For calculate_lid_angle() reliable calculation, code asks for 16 bits sensor value output, this patch fix that as well. Signed-off-by: Paul Ma BRANCH=none BUG=b:110604678 TEST=boot phaser360 board, use 'accelinfo on' to watch lid output and angle output, lid axis value should be 16 bit range and angle is correct. Change-Id: If77954ecf477736b9168b3a3b6805396a3201a57 Reviewed-on: https://chromium-review.googlesource.com/1111775 Commit-Ready: Paul Ma Tested-by: Paul Ma Reviewed-by: Jett Rink --- board/phaser/board.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board/phaser') diff --git a/board/phaser/board.h b/board/phaser/board.h index 4c5a41059a..c8c866b703 100644 --- a/board/phaser/board.h +++ b/board/phaser/board.h @@ -30,7 +30,7 @@ #define CONFIG_CMD_ACCEL_INFO /* Sensors */ -#define CONFIG_ACCEL_LIS2DH /* Lid accel */ +#define CONFIG_ACCEL_LIS2DE /* Lid accel */ #define CONFIG_ACCELGYRO_LSM6DSM /* Base accel */ /* Sensors without hardware FIFO are in forced mode */ #define CONFIG_ACCEL_FORCE_MODE_MASK (1 << LID_ACCEL) -- cgit v1.2.1