iio: imu: inv_icm42600: fix timestamping by limiting FIFO reading

Timestamps are made by measuring the chip clock using the watermark
interrupts. If we read more than watermark samples as done today, we
are reducing the period between interrupts and distort the time
measurement. Fix that by reading only watermark samples in the
interrupt case.

Fixes: 7f85e42a6c ("iio: imu: inv_icm42600: add buffer support in iio devices")
Cc: stable@vger.kernel.org
Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Jean-Baptiste Maneyrol 2026-06-29 21:51:55 +02:00 • committed by Jonathan Cameron
commit affe3f077d
2 changed files with 6 additions and 4 deletions