diff mbox series

[v4,4/6] Documentation:ABI:testing:add doc for AD3552R ABI

Message ID 20210820165927.4524-5-mihail.chindris@analog.com (mailing list archive)
State Changes Requested
Headers show
Series iio: Add output buffer support and DAC example | expand

Commit Message

Chindris, Mihail Aug. 20, 2021, 4:59 p.m. UTC
Add documentation for option for enabling precision mode
of ad3552r

Signed-off-by: Mihail Chindris <mihail.chindris@analog.com>
---
 Documentation/ABI/testing/sysfs-bus-iio-dac-ad3552r | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-dac-ad3552r

Comments

Jonathan Cameron Aug. 30, 2021, 3:22 p.m. UTC | #1
On Fri, 20 Aug 2021 16:59:25 +0000
Mihail Chindris <mihail.chindris@analog.com> wrote:

> Add documentation for option for enabling precision mode
> of ad3552r
> 
> Signed-off-by: Mihail Chindris <mihail.chindris@analog.com>
> ---
>  Documentation/ABI/testing/sysfs-bus-iio-dac-ad3552r | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>  create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-dac-ad3552r
> 
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio-dac-ad3552r b/Documentation/ABI/testing/sysfs-bus-iio-dac-ad3552r
> new file mode 100644
> index 000000000000..37573245f3d5
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-bus-iio-dac-ad3552r
> @@ -0,0 +1,10 @@
> +What:		/sys/bus/iio/devices/iio:deviceX/precision_mode_en
> +KernelVersion:	5.13
> +Contact:	linux-iio@vger.kernel.org
> +Description:
> +		Select between fast mode and precison mode.
> +		0: Fast mode      - For 12 bits precision, the most significant
> +				    bits are used and 16 bits are sent to the
> +				    device per channel, lats bits being 0.

least significant bits being 0

perhaps and definitely not lats bits :)

> +		1: Precision mode - For 16 bits precision, 24 bits are sent to
> +				    the device per channel, last bits being 0.

I don't think the ABI cares about how many bits are sent, but rather it cares
about the precision.

I'm not keen on this ABI if we can possibly avoid it.  It is highly device specific
and therefore unlikely to ever get used by any standard userspace code.

Given I'm fairly sure no linux host is ever going to get anywhere near the maximum
rates this device supports, perhaps we should just always use precision mode and
not worry about this detail?

Jonathan
diff mbox series

Patch

diff --git a/Documentation/ABI/testing/sysfs-bus-iio-dac-ad3552r b/Documentation/ABI/testing/sysfs-bus-iio-dac-ad3552r
new file mode 100644
index 000000000000..37573245f3d5
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-iio-dac-ad3552r
@@ -0,0 +1,10 @@ 
+What:		/sys/bus/iio/devices/iio:deviceX/precision_mode_en
+KernelVersion:	5.13
+Contact:	linux-iio@vger.kernel.org
+Description:
+		Select between fast mode and precison mode.
+		0: Fast mode      - For 12 bits precision, the most significant
+				    bits are used and 16 bits are sent to the
+				    device per channel, lats bits being 0.
+		1: Precision mode - For 16 bits precision, 24 bits are sent to
+				    the device per channel, last bits being 0.