summaryrefslogtreecommitdiff
path: root/scripts/dummy-tools/python3
diff options
context:
space:
mode:
authorRadu Sabau <radu.sabau@analog.com>2026-05-29 13:15:02 +0300
committerJonathan Cameron <jic23@kernel.org>2026-05-31 11:13:12 +0100
commit41297c6bd8dd04c0b23bd7b14e00632cc806688b (patch)
tree1ef872e3bc669bfe3c85cc97d8e7beea655b6dd1 /scripts/dummy-tools/python3
parent40850443aa1239f71fc65b870a0f0ecd54e42c9d (diff)
iio: adc: ad4691: add triggered buffer support
Add buffered capture support using the IIO triggered buffer framework. CNV Burst Mode: the GP pin identified by interrupt-names in the device tree is configured as DATA_READY output. The IRQ handler stops conversions and fires the IIO trigger; the trigger handler executes a pre-built SPI message that reads all active channels from the AVG_IN accumulator registers and then resets accumulator state and restarts conversions for the next cycle. Manual Mode: CNV is tied to SPI CS so each transfer simultaneously reads the previous result and starts the next conversion (pipelined N+1 scheme). At preenable time a pre-built, optimised SPI message of N+1 transfers is constructed (N channel reads plus one NOOP to drain the pipeline). The trigger handler executes the message in a single spi_sync() call and collects the results. An external trigger (e.g. iio-trig-hrtimer) is required to drive the trigger at the desired sample rate. Both modes share the same trigger handler and push a complete scan — one big-endian 16-bit (__be16) slot per active channel, densely packed in scan_index order, followed by a timestamp. The CNV Burst Mode sampling frequency (PWM period) is exposed as a buffer-level attribute via IIO_DEVICE_ATTR. Signed-off-by: Radu Sabau <radu.sabau@analog.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'scripts/dummy-tools/python3')
0 files changed, 0 insertions, 0 deletions