]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: imu: inv_icm42600: change invalid data error to -EBUSY
authorJean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Fri, 8 Aug 2025 07:40:10 +0000 (09:40 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 11 Aug 2025 20:35:01 +0000 (21:35 +0100)
commitdfdc31e7ccf3ac1d5ec01d5120c71e14745e3dd8
tree352678fb3244b4449187d437ff4727002696fa65
parent197e299aae42ffa19028eaea92b2f30dd9fb8445
iio: imu: inv_icm42600: change invalid data error to -EBUSY

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>
drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c