diff options
author | Devin Lu <Devin.Lu@quantatw.com> | 2021-03-16 13:32:32 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-24 07:11:24 +0000 |
commit | 4aa42ad1f88afacf5b5d392f8ec96b03a9716c95 (patch) | |
tree | 703d097ff383ad68c728bbb389b33c672e215230 /board/burnet/board.c | |
parent | 7bf6bd786b4e42636f77d773fab48dd4ed50a0e2 (diff) | |
download | chrome-ec-4aa42ad1f88afacf5b5d392f8ec96b03a9716c95.tar.gz |
Reland "burnet: Change detect method for 2nd base accel"
This is a reland of 3d3f2316b7d2f060d4f8c919a2c82326f8651af3
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: I140aeacd46d74216bc7c999c493dc1be1590aa5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2783510
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Devin Lu <Devin.Lu@quantatw.com>
Tested-by: Devin Lu <Devin.Lu@quantatw.com>
Diffstat (limited to 'board/burnet/board.c')
-rw-r--r-- | board/burnet/board.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/board/burnet/board.c b/board/burnet/board.c index 31eaa7af8e..a4bf2cd59e 100644 --- a/board/burnet/board.c +++ b/board/burnet/board.c @@ -498,11 +498,10 @@ static void board_update_config(void) if (rv == EC_SUCCESS) motion_sensors[LID_ACCEL] = lid_accel_kx022; - /* Ping for ack */ - rv = icm_read8(&base_accel_icm426xx, - ICM426XX_REG_WHO_AM_I, &val); + /* Read icm-40608 chip content */ + rv = icm_read8(&base_accel_icm426xx, ICM426XX_REG_WHO_AM_I, &val); - if (rv == EC_SUCCESS) { + if (rv == EC_SUCCESS && val == ICM426XX_CHIP_ICM40608) { motion_sensors[BASE_ACCEL] = base_accel_icm426xx; motion_sensors[BASE_GYRO] = base_gyro_icm426xx; } |