Re: [PATCH v2 4/8] dt-bindings: iio: adc: add input-channel-rotation property
From: David Lechner
Date: Fri Jun 26 2026 - 14:27:56 EST
On 6/26/26 11:14 AM, Conor Dooley wrote:
> On Thu, Jun 25, 2026 at 04:55:06PM -0500, David Lechner (TI) wrote:
>> Add a generic input-channel-rotation property to adc.yaml. This is a
>> feature seen frequently in ADCs that are designed to measure resistive
>> loads, such as RTDs and strain gauges. Enabling this can reduce offset
>> errors by swapping the positive and negative input channels on every
>> other conversion. This can have side-effects in timing and filter
>> response, so it is not always desirable to enable this feature in some
>> applications. Therefore, it is best to make this a property that can be
>> enabled or disabled in the device tree.
>>
>> Signed-off-by: David Lechner (TI) <dlechner@xxxxxxxxxxxx>
>> ---
>> v2 changes:
>> * New patch.
>> ---
>> Documentation/devicetree/bindings/iio/adc/adc.yaml | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/iio/adc/adc.yaml b/Documentation/devicetree/bindings/iio/adc/adc.yaml
>> index 9ec1f447b565..3d52c00922c9 100644
>> --- a/Documentation/devicetree/bindings/iio/adc/adc.yaml
>> +++ b/Documentation/devicetree/bindings/iio/adc/adc.yaml
>> @@ -81,6 +81,13 @@ properties:
>> ADCs usually allow choosing between internal reference sources or a pair
>> of external pins.
>>
>> + input-channel-rotation:
I got some internal feedback after I sent this patch that "chopping" is the
more common terminology for this feature industry-wide, so in the next revision
I plan to change it into `input-chopping`.
>> + type: boolean
>> + description:
>> + If set, the positive and negative input channels are allowed to be swapped
>> + on every other conversion to reduce offset errors. This is also referred
>> + to as "chop" in some datasheets.
>
> "allowed to be swapped" means that this property says the feature can be
> used, but userspace may have to be the thing that ultimately turns it
> on?
No, I don't expect a userspace control for it. More like the driver should
enable it when possible, but a driver doesn't necessarily have to implement
it and everything will still work, just with less accuracy.
>
>> +
>> excitation-channels:
>> $ref: /schemas/types.yaml#/definitions/uint32-array
>> description:
>>
>> --
>> 2.43.0
>>