mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] iio: pressure: dps310: data-ready trigger
@ 2026-11-14  8:38 Rupesh Majhi
  2026-11-14  8:38 ` [PATCH v2 1/2] dt-bindings: iio: pressure: infineon,dps310: Add interrupts Rupesh Majhi
  2026-11-14  8:38 ` [PATCH v2 2/2] iio: pressure: dps310: add a data-ready trigger Rupesh Majhi
  0 siblings, 2 replies; 3+ messages in thread
From: Rupesh Majhi @ 2026-11-14  8:38 UTC (permalink / raw)
  To: Andy Shevchenko, Conor Dooley, David Lechner, Eddie James,
	Jonathan Cameron, Krzysztof Kozlowski, Nuno Sá,
	Rob Herring
  Cc: devicetree, linux-iio, linux-kernel, Rupesh Majhi, Paulius Zaleckas

DPS310 can raise an interrupt on SDO for each new result. Document it
and use it for a data-ready trigger, so triggered captures follow the
measurements and are stamped with the interrupt time.

With pressure sampled faster than temperature, scans with pressure
need the trigger handler fix [1] to keep up. Without it they come at
the temperature rate, as with any other trigger.

Tested on a DPS310 breakout (0x77) on a BeagleBone Black with SDO to a
GPIO, level-low and falling-edge, with [1] applied: one scan per result
at 1 and 8 Hz, also with the rates at 8/1 and 1/8 Hz, stamps steady to
0.2 ms. With pressure at 1 Hz and temperature at 8 Hz, one temperature
result a second comes 2.4 ms late and the stamps show it. Without an
interrupt nothing changes. Not tested: active high, which needs SDO
strapped low (0x76), and ZTS8032.

If the chip stalls, the case the timeout reset is for, the trigger stops
firing until the buffer is disabled and a read resets the chip.

v2:
- interrupt on temperature results when pressure is not in the scan,
  so a temperature only scan no longer waits in the handler
- limit the trigger to this device, as the interrupt depends on its scan
- local regmap pointer in set_state and probe (Andy)
- rebase on iio/testing

v1: https://lore.kernel.org/linux-iio/20261110154254.39092-1-zoone.rupert@gmail.com/
[1] https://lore.kernel.org/linux-iio/20261113230241.82046-1-zoone.rupert@gmail.com/

Cc: Paulius Zaleckas <paulius.zaleckas@gmail.com>

Rupesh Majhi (2):
  dt-bindings: iio: pressure: infineon,dps310: Add interrupts
  iio: pressure: dps310: add a data-ready trigger

 .../iio/pressure/infineon,dps310.yaml         |  10 ++
 drivers/iio/pressure/dps310.c                 | 139 +++++++++++++++++-
 2 files changed, 145 insertions(+), 4 deletions(-)


base-commit: 7c054db85b5a3ce4d5465cc5cc682cc44ae9eabd
-- 
2.43.0


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

end of thread, other threads:[~2026-11-14  8:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-14  8:38 [PATCH v2 0/2] iio: pressure: dps310: data-ready trigger Rupesh Majhi
2026-11-14  8:38 ` [PATCH v2 1/2] dt-bindings: iio: pressure: infineon,dps310: Add interrupts Rupesh Majhi
2026-11-14  8:38 ` [PATCH v2 2/2] iio: pressure: dps310: add a data-ready trigger 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®