]> 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:05:27 +0000 (11:05 +0100)
commit4b2fac04ed6fc007a86d43bdb0586ca363ec94c2
treea413fd4654276b725672456624810247099f1a25
parente401d55901a83cf022b81d28e892c69f356a6321
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