Re: [PATCH v2 10/10] iio: ABI: add settlingtime attributes
From: Jonathan Cameron
Date: Sat Sep 05 2026 - 21:41:34 EST
On Fri, 04 Sep 2026 17:09:55 -0500
"David Lechner (TI)" <dlechner@xxxxxxxxxxxx> wrote:
> 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.
>
> 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>
One query inline. I'd like a bit in the commit description on that
mostly because I'm failing to remember the answer and there isn't
an obvious right answer.
Jonathan
> ---
> 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.
This probably came up in earlier discussions and I've forgotten it but why
is this not the difference between the time needed for first sample and
that needed for subsequent. That's the only bit that is settling related rather
than acquisition 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
>