• Steve Moskovchenko's avatar
    iio: imu: mpu6050: Fix FIFO layout for ICM20602 · 1615fe41
    Steve Moskovchenko authored
    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>
    1615fe41
inv_mpu_iio.h 10.9 KB