[PATCH 3/4] iio: ABI: add ABI file for the LTC2672 DAC

From: Kim Seer Paller
Date: Thu Apr 11 2024 - 23:22:39 EST


Define the sysfs interface for toggle capable channels.

Toggle enabled channels will have:

* out_currentY_toggle_en
* out_currentY_raw0
* out_currentY_raw1
* out_currentY_symbol

The common interface present in all channels is:

* out_currentY_raw (not present in toggle enabled channels)
* out_currentY_raw_available
* out_currentY_powerdown
* out_currentY_scale
* out_currentY_offset

Co-developed-by: Michael Hennerich <michael.hennerich@xxxxxxxxxx>
Signed-off-by: Michael Hennerich <michael.hennerich@xxxxxxxxxx>
Signed-off-by: Kim Seer Paller <kimseer.paller@xxxxxxxxxx>
---
.../ABI/testing/sysfs-bus-iio-dac-ltc2672 | 30 +++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 31 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-dac-ltc2672

diff --git a/Documentation/ABI/testing/sysfs-bus-iio-dac-ltc2672 b/Documentation/ABI/testing/sysfs-bus-iio-dac-ltc2672
new file mode 100644
index 000000000..b984d92f7
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-bus-iio-dac-ltc2672
@@ -0,0 +1,30 @@
+What: /sys/bus/iio/devices/iio:deviceX/out_currentY_toggle_en
+KernelVersion: 5.18
+Contact: linux-iio@xxxxxxxxxxxxxxx
+Description:
+ Toggle enable. Write 1 to enable toggle or 0 to disable it. This is
+ useful when one wants to change the DAC output codes. The way it should
+ be done is:
+
+ - disable toggle operation;
+ - change out_currentY_raw0 and out_currentY_raw1;
+ - enable toggle operation.
+
+What: /sys/bus/iio/devices/iio:deviceX/out_currentY_raw0
+What: /sys/bus/iio/devices/iio:deviceX/out_currentY_raw1
+KernelVersion: 5.18
+Contact: linux-iio@xxxxxxxxxxxxxxx
+Description:
+ It has the same meaning as out_currentY_raw. This attribute is
+ specific to toggle enabled channels and refers to the DAC output
+ code in INPUT_A (_raw0) and INPUT_B (_raw1). The same scale and offset
+ as in out_currentY_raw applies.
+
+What: /sys/bus/iio/devices/iio:deviceX/out_currentY_symbol
+KernelVersion: 5.18
+Contact: linux-iio@xxxxxxxxxxxxxxx
+Description:
+ Performs a SW toggle. This attribute is specific to toggle
+ enabled channels and allows to toggle between out_currentY_raw0
+ and out_currentY_raw1 through software. Writing 0 will select
+ out_currentY_raw0 while 1 selects out_currentY_raw1.
diff --git a/MAINTAINERS b/MAINTAINERS
index 9ed00b364..fba8bacc0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12843,6 +12843,7 @@ L: linux-iio@xxxxxxxxxxxxxxx
S: Supported
W: https://ez.analog.com/linux-software-drivers
F: Documentation/ABI/testing/sysfs-bus-iio-dac-ltc2664
+F: Documentation/ABI/testing/sysfs-bus-iio-dac-ltc2672
F: Documentation/devicetree/bindings/iio/dac/adi,ltc2664.yaml

LTC2688 IIO DAC DRIVER
--
2.34.1