[PATCH V15 8/9] iio: imu: inv_icm42607: Add Temp Support in icm42607
Jonathan Cameron
jic23 at kernel.org
Wed Jul 1 12:30:44 PDT 2026
On Fri, 26 Jun 2026 11:12:29 -0500
Chris Morgan <macroalpha82 at gmail.com> wrote:
> From: Chris Morgan <macromorgan at hotmail.com>
>
> Add functions for reading temperature sensor data.
>
> Signed-off-by: Chris Morgan <macromorgan at hotmail.com>
The earlier comments on read_avail are really about a change need in this patch.
> diff --git a/drivers/iio/imu/inv_icm42607/inv_icm42607_gyro.c b/drivers/iio/imu/inv_icm42607/inv_icm42607_gyro.c
> index c7215b3826ad..4e5db5e19e9f 100644
> --- a/drivers/iio/imu/inv_icm42607/inv_icm42607_gyro.c
> +++ b/drivers/iio/imu/inv_icm42607/inv_icm42607_gyro.c
>
> static const int inv_icm42607_gyro_scale_nano[][2] = {
> @@ -182,6 +185,11 @@ static int inv_icm42607_gyro_read_raw(struct iio_dev *indio_dev,
> switch (chan->type) {
> case IIO_ANGL_VEL:
> break;
> + case IIO_TEMP:
This works for read_raw, but the read_avail reported on earlier patches is
still an issue for temperature channels.
> + if (mask != IIO_CHAN_INFO_SAMP_FREQ)
> + return inv_icm42607_temp_read_raw(indio_dev, chan,
> + val, val2, mask);
> + break;
> default:
> return -EINVAL;
> }
More information about the Linux-rockchip
mailing list