Skip to content
Commit 2e7e3f16 authored by Steve Moskovchenko's avatar Steve Moskovchenko Committed by Greg Kroah-Hartman
Browse files

iio: imu: mpu6050: Fix FIFO layout for ICM20602



[ Upstream commit 1615fe41 ]

The MPU6050 driver has recently gained support for the
ICM20602 IMU, which is very similar to MPU6xxx. However,
the ICM20602's FIFO data specifically includes temperature
readings, which were not present on MPU6xxx parts. As a
result, the driver will under-read the ICM20602's FIFO
register, causing the same (partial) sample to be returned
for all reads, until the FIFO overflows.

Fix this by adding a table of scan elements specifically
for the ICM20602, which takes the extra temperature data
into consideration.

While we're at it, fix the temperature offset and scaling
on ICM20602, since it uses different scale/offset constants
than the rest of the MPU6xxx devices.

Signed-off-by: default avatarSteve Moskovchenko <stevemo@skydio.com>
Fixes: 22904bdf ("iio: imu: mpu6050: Add support for the ICM 20602 IMU")
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 99ea48af
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment