Linux IIO development
 help / color / mirror / Atom feed
* [PATCH v6 0/6] iio: pressure: dps310: FIFO and triggered buffer support
@ 2026-08-24 20:11 Rupesh Majhi
  2026-08-24 20:11 ` [PATCH v6 1/6] iio: pressure: dps310: fix CFG_REG bit definitions Rupesh Majhi
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Rupesh Majhi @ 2026-08-24 20:11 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

dps310 has no buffer support today. This series adds it, hardware FIFO
when no external trigger is attached, FIFO left disabled in favor of the
trigger when one is.

Patch 1 fixes CFG_REG bit definitions. It replaces the standalone fix I
sent 27 July, which Jonathan asked to fold in here instead:

  Link: https://lore.kernel.org/linux-iio/20260728223009.0cb86996@jic23-huawei/

FIFO_EN is needed by patch 5.

Patches 2 and 3 are precursors Jonathan asked for on v5, so the buffer
patches carry only buffer work. Patch 4 adds the triggered buffer, patch
5 the FIFO and selection between the two. Patch 6 turns on clang context
analysis for this driver, so the lock markings are checked and not just
documented. It is last, drop it if IIO would rather not opt in yet.

Tested on an Infineon DPS310 wired to a BeagleBone Black. Lock markings
clean under clang 23.1.0.

Changes since v5:
- split probe device pointer and read path rework into their own patches
- __must_hold() markings instead of comments saying a lock is held, plus
  a last patch opting the driver into the analysis that checks them
- get_unaligned_be24() for the 24 bit results
- scan is a structure now, not a byte buffer with memcpys
- timestamp taken in the trigger handler, not iio_pollfunc_store_time,
  which works with nested triggers too
- plain mutex_lock() where the guard hurt readability
- clamp() instead of clamp_t()
- commit messages cut down, Assisted-by tags added

Rupesh Majhi (6):
  iio: pressure: dps310: fix CFG_REG bit definitions
  iio: pressure: dps310: use a local device pointer in probe
  iio: pressure: dps310: rework the raw read paths
  iio: pressure: dps310: add triggered buffer support
  iio: pressure: dps310: add hardware FIFO support
  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 | 738 ++++++++++++++++++++++++++++++----
 3 files changed, 654 insertions(+), 88 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-08-25  9:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-24 20:11 [PATCH v6 0/6] iio: pressure: dps310: FIFO and triggered buffer support Rupesh Majhi
2026-08-24 20:11 ` [PATCH v6 1/6] iio: pressure: dps310: fix CFG_REG bit definitions Rupesh Majhi
2026-08-24 20:11 ` [PATCH v6 2/6] iio: pressure: dps310: use a local device pointer in probe Rupesh Majhi
2026-08-24 20:12 ` [PATCH v6 3/6] iio: pressure: dps310: rework the raw read paths Rupesh Majhi
2026-08-25  8:59   ` Andy Shevchenko
2026-08-24 20:12 ` [PATCH v6 4/6] iio: pressure: dps310: add triggered buffer support Rupesh Majhi
2026-08-25  9:06   ` Andy Shevchenko
2026-08-24 20:12 ` [PATCH v6 5/6] iio: pressure: dps310: add hardware FIFO support Rupesh Majhi
2026-08-25  9:39   ` Andy Shevchenko
2026-08-24 20:12 ` [PATCH v6 6/6] 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