]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:31 +0000 (11:07 +0100)
commit658bb7b28c816dc56220e4afede343e53c1c249c
tree9cec942dc591bd75a1ba17787808c0608dbcd5d0
parent228c6c61fa2b49521c8fdb7a663330e4919b07a9
iio: imu: inv_icm42600: Fix temperature calculation

commit e2f820014239df9360064079ae93f838ff3b7f8c upstream.

>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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c