summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>2024-04-26 11:48:35 +0200
committerJonathan Cameron <jonathan.cameron@huawei.com>2024-05-03 12:48:56 +0200
commitbf8367b00c33c64a9391c262bb2e11d274c9f2a4 (patch)
tree573de3f6937ed28b9c5cec06fb001536082264c1 /include
parentiio: invensense: fix interrupt timestamp alignment (diff)
downloadlinux-bf8367b00c33c64a9391c262bb2e11d274c9f2a4.tar.xz
linux-bf8367b00c33c64a9391c262bb2e11d274c9f2a4.zip
iio: invensense: fix timestamp glitches when switching frequency
When a sensor is running and there is a FIFO frequency change due to another sensor turned on/off, there are glitches on timestamp. Fix that by using only interrupt timestamp when there is the corresponding sensor data in the FIFO. Delete FIFO period handling and simplify internal functions. Update integration inside inv_mpu6050 and inv_icm42600 drivers. Fixes: 0ecc363ccea7 ("iio: make invensense timestamp module generic") Cc: Stable@vger.kernel.org Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com> Link: https://lore.kernel.org/r/20240426094835.138389-1-inv.git-commit@tdk.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/iio/common/inv_sensors_timestamp.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/iio/common/inv_sensors_timestamp.h b/include/linux/iio/common/inv_sensors_timestamp.h
index a47d304d1ba7..8d506f1e9df2 100644
--- a/include/linux/iio/common/inv_sensors_timestamp.h
+++ b/include/linux/iio/common/inv_sensors_timestamp.h
@@ -71,8 +71,7 @@ int inv_sensors_timestamp_update_odr(struct inv_sensors_timestamp *ts,
uint32_t period, bool fifo);
void inv_sensors_timestamp_interrupt(struct inv_sensors_timestamp *ts,
- uint32_t fifo_period, size_t fifo_nb,
- size_t sensor_nb, int64_t timestamp);
+ size_t sample_nb, int64_t timestamp);
static inline int64_t inv_sensors_timestamp_pop(struct inv_sensors_timestamp *ts)
{