]> git.ipfire.org Git - thirdparty/linux.git/commit
iio: imu: inv_icm42600: Fix temperature calculation
authorSean Nyekjaer <sean@geanix.com>
Fri, 2 May 2025 09:37:26 +0000 (11:37 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 7 May 2025 18:40:38 +0000 (19:40 +0100)
commite2f820014239df9360064079ae93f838ff3b7f8c
tree676c75f36f9e8408f979ae81b96fe24fb3b4d075
parent921fece3268c3bf2e8c20dd17ff9e5454fa16fda
iio: imu: inv_icm42600: Fix temperature calculation

>From the documentation:
"offset to be added to <type>[Y]_raw prior toscaling by <type>[Y]_scale"
Offset should be applied before multiplying scale, so divide offset by
scale to make this correct.

Fixes: bc3eb0207fb5 ("iio: imu: inv_icm42600: add temperature sensor support")
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Link: https://patch.msgid.link/20250502-imu-v1-1-129b8391a4e3@geanix.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c