iio: imu: inv_mpu6050: fix temperature reporting using bad unit
authorJean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Tue, 26 Nov 2019 16:19:12 +0000 (17:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2019 19:34:37 +0000 (20:34 +0100)
commit8b462a32692041e7006a5dae21f51341bf975977
treec395f6ff1af26ae251fbd63af0201d9217ac6b37
parent299f9959676426a3df2bc10e0057608041be8c3b
iio: imu: inv_mpu6050: fix temperature reporting using bad unit

commit 53eaa9c27fdc01b4f4d885223e29f97393409e7e upstream.

Temperature should be reported in milli-degrees, not degrees. Fix
scale and offset values to use the correct unit.

This is a fix for an issue that has been present for a long time.
The fixes tag reflects the point at which the code last changed in a
fashion that would make this fix patch no longer apply.  Backports
will be necessary to fix those elements that predate that patch.

Fixes: 1615fe41a195 ("iio: imu: mpu6050: Fix FIFO layout for ICM20602")
Cc: stable@vger.kernel.org
Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h