Re: [PATCH v7 6/6] docs: iio: adc: ad4691: add driver documentation
From: David Lechner
Date: Fri Apr 10 2026 - 17:44:17 EST
On 4/9/26 10:28 AM, Radu Sabau via B4 Relay wrote:
> From: Radu Sabau <radu.sabau@xxxxxxxxxx>
>
> Add RST documentation for the AD4691 family ADC driver covering
> supported devices, IIO channels, operating modes, oversampling,
> reference voltage, LDO supply, reset, GP pins, SPI offload support,
> and buffer data format.
>
> Signed-off-by: Radu Sabau <radu.sabau@xxxxxxxxxx>
> ---
> Documentation/iio/ad4691.rst | 283 +++++++++++++++++++++++++++++++++++++++++++
> Documentation/iio/index.rst | 1 +
> MAINTAINERS | 1 +
> 3 files changed, 285 insertions(+)
>
> diff --git a/Documentation/iio/ad4691.rst b/Documentation/iio/ad4691.rst
> new file mode 100644
> index 000000000000..a1012c8b78a3
> --- /dev/null
> +++ b/Documentation/iio/ad4691.rst
> @@ -0,0 +1,283 @@
> +.. SPDX-License-Identifier: GPL-2.0-only
> +
> +=============
> +AD4691 driver
> +=============
One overall comment. This goes into driver implementation details quite a bit.
I think that is really better done as comments in the driver itself. And this
document should just focus on how to use the driver from the userspace point
of view.
> +Buffer data format
> +==================
> +
> +The IIO buffer data format (``in_voltageN_type``) is the same across all
> +paths: 16-bit unsigned big-endian samples with no shift.
> +
> ++-------------------------+-------------+----------+-------+
> +| Path | storagebits | realbits | shift |
> ++=========================+=============+==========+=======+
> +| Triggered buffer | 16 | 16 | 0 |
> ++-------------------------+-------------+----------+-------+
> +| CNV Burst offload (DMA) | 16 | 16 | 0 |
> ++-------------------------+-------------+----------+-------+
> +| Manual offload (DMA) | 16 | 16 | 0 |
> ++-------------------------+-------------+----------+-------+
Not sure this table is helpful since all values are the same everywhere.
Also, doesn't SPI offload have storagebits == 32?
> +
> +In the triggered-buffer path the SPI rx_buf for each transfer points directly
> +into the scan buffer, so the 16-bit big-endian result is written in place with
> +no additional copying.
> +