Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation: iio: ad4000: Describe offload support

When SPI offloading is supported, the IIO device provides different sysfs
interfaces to allow using the adjusting the sample rate. Document SPI
offload support for AD4000 and similar devices.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Link: https://patch.msgid.link/eb94013b1a4d66a8492cf094aef3e4410f81d22b.1743110188.git.marcelo.schmitt@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Marcelo Schmitt and committed by
Jonathan Cameron
8c411d4b d66b2c84

+27
+27
Documentation/iio/ad4000.rst
··· 191 191 +-------------------------------------------+------------------------------------------+ 192 192 | ``in_voltage0-voltage1_scale_available`` | Toggles input span compression | 193 193 +-------------------------------------------+------------------------------------------+ 194 + 195 + SPI offload support 196 + ------------------- 197 + 198 + To be able to achieve the maximum sample rate, the driver can be used with SPI 199 + offload engines such as the one usually present in `AXI SPI Engine`_, to provide 200 + SPI offload support. 201 + 202 + .. _AXI SPI Engine: http://analogdevicesinc.github.io/hdl/projects/pulsar_adc/index.html 203 + 204 + To keep up with SPI offloading transfer speeds, the ADC must be connected either 205 + in 3-wire turbo mode or in 3-wire without busy indicator mode and have SPI 206 + controller CS line connected to the CNV pin. 207 + 208 + When set for SPI offload support, the IIO device will provide different 209 + interfaces. 210 + 211 + * Either ``in_voltage0_sampling_frequency`` or 212 + ``in_voltage0-voltage1_sampling_frequency`` file is provided to allow setting 213 + the sample rate. 214 + * IIO trigger device is not provided (no ``trigger`` directory). 215 + * ``timestamp`` channel is not provided. 216 + 217 + Also, because the ADC output has a one sample latency (delay) when the device is 218 + wired in "3-wire" mode and only one transfer per sample is done when using SPI 219 + offloading, the first data sample in the buffer is not valid because it contains 220 + the output of an earlier conversion result.