mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v8 00/10] iio: pressure: dps310: FIFO and triggered buffer support
@ 2026-09-21 18:31 Rupesh Majhi
  2026-09-21 18:31 ` [PATCH v8 01/10] iio: pressure: dps310: fix CFG_REG bit definitions Rupesh Majhi
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Rupesh Majhi @ 2026-09-21 18:31 UTC (permalink / raw)
  To: Andy Shevchenko, Bill Wendling, David Lechner, Eddie James,
	Joel Stanley, Jonathan Cameron, Justin Stitt, Nathan Chancellor,
	Nick Desaulniers, Nuno Sá
  Cc: linux-iio, linux-kernel, llvm, Rupesh Majhi

Jonathan's review fixes on v7. Same functionality, except the flush hook,
which now holds the device mode while it drains.

Since v7:
 - the timestamp scan index lands in patch 5, where the enum is
 - the FIFO drain reads with one loop counter, declarations split
 - dps310_fifo_hold_free() is gone. It was a bare kfree() once the
   clearing went, and the alloc side sets the fields instead
 - the flush hook holds the mode across the drain, so a concurrent
   buffer disable cannot free active_scan_mask under it. Found by
   Sashiko on v7. Done with IIO_DEV_GUARD_CURRENT_MODE() and not the
   buffer mode claim, which patch 10 warns on, see the reply on 9/10

Retested on a DPS310 on a BeagleBone Black: six of six buffer enables
produce data, and 64 scan reads come back whole at watermark 1, 8 and 24.
Built with clang 23 and CONFIG_WARN_CONTEXT_ANALYSIS, no warnings.

Patch 10 opts into clang context analysis and comes last, so it can be
dropped alone.

Deferred to a cleanup series: min_t() to min(), 1000 to KILO,
30 * USEC_PER_MSEC, David's define sort, c00/c10 via get_unaligned_be24().

Rupesh Majhi (10):
  iio: pressure: dps310: fix CFG_REG bit definitions
  iio: pressure: dps310: use a local device pointer in probe
  iio: pressure: dps310: use get_unaligned_be24() for the 24-bit results
  iio: pressure: dps310: take the lock once per raw read
  iio: pressure: dps310: add triggered buffer support
  iio: core: add an accessor for scan_timestamp
  iio: pressure: dps310: read buffered samples from the hardware FIFO
  iio: pressure: dps310: derive the drain interval from the watermark
  iio: pressure: dps310: implement .hwfifo_flush_to_buffer()
  iio: pressure: dps310: check the lock markings with context analysis

 drivers/iio/pressure/Kconfig  |   2 +
 drivers/iio/pressure/Makefile |   2 +
 drivers/iio/pressure/dps310.c | 726 ++++++++++++++++++++++++++++++----
 include/linux/iio/iio.h       |   9 +
 4 files changed, 652 insertions(+), 87 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-09-21 18:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-21 18:31 [PATCH v8 00/10] iio: pressure: dps310: FIFO and triggered buffer support Rupesh Majhi
2026-09-21 18:31 ` [PATCH v8 01/10] iio: pressure: dps310: fix CFG_REG bit definitions Rupesh Majhi
2026-09-21 18:31 ` [PATCH v8 02/10] iio: pressure: dps310: use a local device pointer in probe Rupesh Majhi
2026-09-21 18:31 ` [PATCH v8 03/10] iio: pressure: dps310: use get_unaligned_be24() for the 24-bit results Rupesh Majhi
2026-09-21 18:31 ` [PATCH v8 04/10] iio: pressure: dps310: take the lock once per raw read Rupesh Majhi
2026-09-21 18:31 ` [PATCH v8 05/10] iio: pressure: dps310: add triggered buffer support Rupesh Majhi
2026-09-21 18:31 ` [PATCH v8 06/10] iio: core: add an accessor for scan_timestamp Rupesh Majhi
2026-09-21 18:31 ` [PATCH v8 07/10] iio: pressure: dps310: read buffered samples from the hardware FIFO Rupesh Majhi
2026-09-21 18:31 ` [PATCH v8 08/10] iio: pressure: dps310: derive the drain interval from the watermark Rupesh Majhi
2026-09-21 18:31 ` [PATCH v8 09/10] iio: pressure: dps310: implement .hwfifo_flush_to_buffer() Rupesh Majhi
2026-09-21 18:31 ` [PATCH v8 10/10] iio: pressure: dps310: check the lock markings with context analysis Rupesh Majhi

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

all inboxes | Powered by JetHome®