Re: [PATCH] iio: imu: inv_icm42600: fix parsing of all FIFO frames for odr change

From: Andy Shevchenko

Date: Fri Oct 16 2026 - 06:26:27 EST


On Fri, Oct 16, 2026 at 11:28:10AM +0200, Jean-Baptiste Maneyrol via B4 Relay wrote:

> For getting all odr change events, we need to parse all FIFO frames
> in each iio device. Fix this correctly by sending effectively all
> frames to all iio devices.
>
> Previously only batches of frames containing a matching sensor event
> were sent to the corresponding iio device.

...

> - ret = inv_icm42600_gyro_parse_fifo(st->indio_gyro);
> - if (ret)
> - return ret;
> }

+ Blank line.

> + ret = inv_icm42600_gyro_parse_fifo(st->indio_gyro);
> + if (ret)
> + return ret;
>
> /* handle accelerometer timestamp and FIFO data parsing */
> if (st->fifo.nb.accel > 0) {
> ts = &accel_st->ts;
> inv_sensors_timestamp_interrupt(ts, st->fifo.watermark.eff_accel,
> st->timestamp.accel);
> - ret = inv_icm42600_accel_parse_fifo(st->indio_accel);
> - if (ret)
> - return ret;
> }

+ blank line.

> + ret = inv_icm42600_accel_parse_fifo(st->indio_accel);
> + if (ret)
> + return ret;
>
> return 0;
> }

return inv_icm42600_accel_parse_fifo(st->indio_accel);

?

...

Similar comments to the inv_icm42600_buffer_hwfifo_flush() changes.

--
With Best Regards,
Andy Shevchenko