Linux IIO development
 help / color / mirror / Atom feed
* [PATCH v2 0/3] iio: common: improve InvenSense sample timestamping
@ 2026-07-20 10:38 Jean-Baptiste Maneyrol via B4 Relay
  2026-07-20 10:38 ` [PATCH v2 1/3] iio: inv_sensors: convert to kernel types Jean-Baptiste Maneyrol via B4 Relay
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jean-Baptiste Maneyrol via B4 Relay @ 2026-07-20 10:38 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko
  Cc: linux-iio, linux-kernel, Jean-Baptiste Maneyrol

This series improves the InvenSense timestamping mechanism for 2 cases:
when using watermark and for high frequency sampling.

Data arriving by batch because of FIFO watermark will now be all aligned
correctly with the interrupt timestamp and the chip period measurement
will use a minimal period of 20ms to ensure that system latency is
not preventing measurement when using high frequency sampling.

This was tested using inv_icm42600 driver when using maximum FIFO
watermark and when using 1kHz sampling frequency.

Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
---
Changes in v2:
- Add a 1st patch to convert to kernel types.
- Rework following review suggestions.
- Following Sashiko fix delta_counter usage and handle case of
  timestamp overflowing last interrupt by using s64 type for new_period.
- Reword commit message for better timestamp alignement using Jonathan
  proposition.
- Link to v1: https://patch.msgid.link/20260717-iio-common-inv-sensors-timestamp-rework-v1-0-d1afee2805cd@tdk.com

To: Jonathan Cameron <jic23@kernel.org>
To: David Lechner <dlechner@baylibre.com>
To: Nuno Sá <nuno.sa@analog.com>
To: Andy Shevchenko <andy@kernel.org>
Cc: linux-iio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

---
Jean-Baptiste Maneyrol (3):
      iio: inv_sensors: convert to kernel types
      iio: inv_sensors: better timestamp alignment when using watermark
      iio: inv_sensors: improve period measurement by using a longer delay

 .../iio/common/inv_sensors/inv_sensors_timestamp.c | 109 +++++++++++----------
 include/linux/iio/common/inv_sensors_timestamp.h   |  40 ++++----
 2 files changed, 81 insertions(+), 68 deletions(-)
---
base-commit: aa58ecc73466d0cb8c418de98e2225490bf600e3
change-id: 20260715-iio-common-inv-sensors-timestamp-rework-acf1a0aa00f4

Best regards,
--  
Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-07-24  0:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-20 10:38 [PATCH v2 0/3] iio: common: improve InvenSense sample timestamping Jean-Baptiste Maneyrol via B4 Relay
2026-07-20 10:38 ` [PATCH v2 1/3] iio: inv_sensors: convert to kernel types Jean-Baptiste Maneyrol via B4 Relay
2026-07-20 11:29   ` Andy Shevchenko
2026-07-24  0:01     ` Jonathan Cameron
2026-07-20 10:38 ` [PATCH v2 2/3] iio: inv_sensors: better timestamp alignment when using watermark Jean-Baptiste Maneyrol via B4 Relay
2026-07-20 11:33   ` Andy Shevchenko
2026-07-20 15:07     ` Jean-Baptiste Maneyrol
2026-07-20 19:31       ` Andy Shevchenko
2026-07-20 10:38 ` [PATCH v2 3/3] iio: inv_sensors: improve period measurement by using a longer delay Jean-Baptiste Maneyrol via B4 Relay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox