]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: imu: inv_icm42600: fix timestamping by limiting FIFO reading
authorJean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Mon, 29 Jun 2026 19:51:55 +0000 (21:51 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sat, 4 Jul 2026 23:01:48 +0000 (00:01 +0100)
commitaffe3f077d7a4eeb25937f5323ff059a54b4712c
tree7f1a0342c31df67537a7300583841eaa5546df00
parentaede83625ff5d9539508582036df30c809d51058
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: 7f85e42a6c54 ("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>
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.h