]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: imu: inv_icm42600: change invalid data error to -EBUSY
authorJean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Sun, 24 Aug 2025 14:44:36 +0000 (10:44 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:26:16 +0000 (16:26 +0200)
commit8fc74d5f3e257c92cdc02703b013a822486ca686
tree9b21b1e2f93420028819c6bb7fab444387a7c0e4
parent2902c3ebcca52ca845c03182000e8d71d3a5196f
iio: imu: inv_icm42600: change invalid data error to -EBUSY

[ Upstream commit dfdc31e7ccf3ac1d5ec01d5120c71e14745e3dd8 ]

Temperature sensor returns the temperature of the mechanical parts
of the chip. If both accel and gyro are off, the temperature sensor is
also automatically turned off and returns invalid data.

In this case, returning -EBUSY error code is better then -EINVAL and
indicates userspace that it needs to retry reading temperature in
another context.

Fixes: bc3eb0207fb5 ("iio: imu: inv_icm42600: add temperature sensor support")
Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Cc: stable@vger.kernel.org
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Reviewed-by: Sean Nyekjaer <sean@geanix.com>
Link: https://patch.msgid.link/20250808-inv-icm42600-change-temperature-error-code-v1-1-986fbf63b77d@tdk.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
[ Adjust context ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c