[PATCH v3 10/10] iio: ABI: add settlingtime attributes
From: David Lechner (TI)
Date: Thu Sep 10 2026 - 17:21:21 EST
Add new generic attributes for input settling time introduced in the
ti-ads122c14 driver.
Usually, in IIO the output data rate is 1 / sampling_frequency. There
are known devices (generally ones with filtering and oversampling) where
the first conversion takes longer than 1 / sampling_frequency to allow
the input to settle in order to have a valid conversion result. Then,
any subsequent conversions in a continuous sampling mode would be done
at the regular interval defined by 1 / sampling_frequency.
This attribute is intended to allow controlling that settling time
duration.
The total settling time is used rather than the difference between the
time needed for the first sample and subsequent samples so that it can
be read back directly via settlingtime_available without also reading
sampling_frequency to compute a delta. The available range's minimum
value represents the fixed, always-present portion of the delay (which
typically already includes the time for a normal conversion), so
requesting that minimum is equivalent to no additional settling delay.
A device that has input chopping enabled would see this settling time on
every conversion since the device setting (i.e. the input mux) changes
on every conversion.
Signed-off-by: David Lechner (TI) <dlechner@xxxxxxxxxxxx>
---
Documentation/ABI/testing/sysfs-bus-iio | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index a8e1cb8e7490..045589058655 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -2402,6 +2402,32 @@ Description:
Specifies which filter type apply to the channel. The possible
values are given by the filter_type_available attribute.
+What: /sys/bus/iio/devices/iio:deviceX/in_resistanceY_settlingtime
+What: /sys/bus/iio/devices/iio:deviceX/in_tempY_settlingtime
+What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_settlingtime
+What: /sys/bus/iio/devices/iio:deviceX/in_voltageY-voltageZ_settlingtime
+KernelVersion: 7.4
+Contact: linux-iio@xxxxxxxxxxxxxxx
+Description:
+ Set/read total settling time in seconds for a device to settle
+ after starting the first conversion after any settings have
+ changed. The data for the conversion is outputted at the end of
+ this time.
+
+ Depending on the device and how it is used, this settling time
+ may apply to more than just the first conversion, e.g. to every
+ conversion in a single-shot conversion mode or when a device
+ setting changes after each conversion (input chopping).
+
+What: /sys/bus/iio/devices/iio:deviceX/in_resistanceY_settlingtime_available
+What: /sys/bus/iio/devices/iio:deviceX/in_tempY_settlingtime_available
+What: /sys/bus/iio/devices/iio:deviceX/in_voltageY_settlingtime_available
+What: /sys/bus/iio/devices/iio:deviceX/in_voltageY-voltageZ_settlingtime_available
+KernelVersion: 7.4
+Contact: linux-iio@xxxxxxxxxxxxxxx
+Description:
+ Available settlingtime values in IIO range or list format.
+
What: /sys/.../events/in_proximity_thresh_either_runningperiod
KernelVersion: 6.6
Contact: linux-iio@xxxxxxxxxxxxxxx
--
2.43.0