[PATCH V2 2/5] iio: imu: inv_icm42600: Add support for using alternate registers
Jonathan Cameron
jic23 at kernel.org
Sat Mar 21 10:50:36 PDT 2026
On Thu, 19 Mar 2026 13:29:38 -0500
Chris Morgan <macroalpha82 at gmail.com> wrote:
> From: Chris Morgan <macromorgan at hotmail.com>
>
> Add support to the existing inv_icm42600 to support similar hardware
> with slightly different register layouts. For example the icm42607
> and icm42607p has most of the same functionality and even many of
> the same registers, but the addresses for indiviual registers differ.
>
> Signed-off-by: Chris Morgan <macromorgan at hotmail.com>
> diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c
> index 11339ddf1da3..32aa2e52df2e 100644
> --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c
> +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c
> @@ -775,13 +774,13 @@ struct iio_dev *inv_icm42600_gyro_init(struct inv_icm42600_state *st)
> ret = devm_iio_kfifo_buffer_setup(dev, indio_dev,
> &inv_icm42600_buffer_ops);
> if (ret)
> - return ERR_PTR(ret);
> + return ret;
>
> ret = devm_iio_device_register(dev, indio_dev);
return devm_iio_device_register() now make sense.
More information about the Linux-rockchip
mailing list