summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin Lu <Devin.Lu@quantatw.com>2021-03-24 02:47:13 +0000
committerCommit Bot <commit-bot@chromium.org>2021-03-24 04:51:26 +0000
commitf29b02cb6132e874873c0cfee692cb877ec98522 (patch)
treecf5effc433289c26f6587470917999358240584d
parenta6200934f5a9c01d37cffb9fc1e170234f60863e (diff)
downloadchrome-ec-f29b02cb6132e874873c0cfee692cb877ec98522.tar.gz
Revert "burnet: Change detect method for 2nd base accel"
This reverts commit 3d3f2316b7d2f060d4f8c919a2c82326f8651af3. Reason for revert: <Missing return rv> Original change's description: > burnet: Change detect method for 2nd base accel > > Both bmi160 and icm-40608 are using spi interface with Jacuzzi. > The sensor will acknowledge with the ping. we should make sure > the return value is matching the chip content. > > BUG=b:173647487 > BRANCH=firmware-kukui-12573.B > TEST=ectool motionsense on both bmi160 and icm-40608 > > Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> > Change-Id: I3a502c182bb766b52dd5d85014478f9c0014360a > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2763605 > Reviewed-by: Ting Shen <phoenixshen@chromium.org> Bug: b:173647487 Change-Id: Ie6e5c895f558a9cdc53648599502abcf2b8dae89 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2783504 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Tested-by: Devin Lu <Devin.Lu@quantatw.com> Commit-Queue: Devin Lu <Devin.Lu@quantatw.com>
-rw-r--r--board/burnet/board.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/board/burnet/board.c b/board/burnet/board.c
index 9737fd633c..31eaa7af8e 100644
--- a/board/burnet/board.c
+++ b/board/burnet/board.c
@@ -498,10 +498,11 @@ static void board_update_config(void)
if (rv == EC_SUCCESS)
motion_sensors[LID_ACCEL] = lid_accel_kx022;
- /* Read icm-40608 chip content */
- icm_read8(&base_accel_icm426xx, ICM426XX_REG_WHO_AM_I, &val);
+ /* Ping for ack */
+ rv = icm_read8(&base_accel_icm426xx,
+ ICM426XX_REG_WHO_AM_I, &val);
- if (rv == EC_SUCCESS && val == ICM426XX_CHIP_ICM40608) {
+ if (rv == EC_SUCCESS) {
motion_sensors[BASE_ACCEL] = base_accel_icm426xx;
motion_sensors[BASE_GYRO] = base_gyro_icm426xx;
}