]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: imu: inv_icm42600: enable temp polling when buffer is on
authorJean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Thu, 18 Dec 2025 09:21:17 +0000 (10:21 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 21 Dec 2025 18:42:12 +0000 (18:42 +0000)
Delete iio_device_claim_direct_mode() when reading temperature.
It enables polling of temperature data while buffer is on and it
doesn't have any impact on the other sensors.

Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c

index 30f6a9595eea2308ef9ab0660210fc14ca758198..727b03d541a58a27cc9d793da78d1f4a1c460297 100644 (file)
@@ -59,10 +59,7 @@ int inv_icm42600_temp_read_raw(struct iio_dev *indio_dev,
 
        switch (mask) {
        case IIO_CHAN_INFO_RAW:
-               if (!iio_device_claim_direct(indio_dev))
-                       return -EBUSY;
                ret = inv_icm42600_temp_read(st, &temp);
-               iio_device_release_direct(indio_dev);
                if (ret)
                        return ret;
                *val = temp;