Re: [PATCH RFC v2 1/3] dt-bindings: iio: adc: Add reference-source property

From: David Lechner

Date: Thu Jul 02 2026 - 15:43:18 EST


On 7/2/26 2:20 PM, Jonathan Cameron wrote:
> On Mon, 22 Jun 2026 14:40:10 -0500
> David Lechner <dlechner@xxxxxxxxxxxx> wrote:
>
>> On 6/22/26 2:30 PM, Kurt Borja wrote:
>>> Some ADCs have configurable voltage reference sources for each channel.
>>>
>>> Signed-off-by: Kurt Borja <kuurtb@xxxxxxxxx>
>>> ---
>>> Documentation/devicetree/bindings/iio/adc/adc.yaml | 13 +++++++++++++
>>> 1 file changed, 13 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/iio/adc/adc.yaml b/Documentation/devicetree/bindings/iio/adc/adc.yaml
>>> index b9bc02b5b07a4c7..fdad6b8276c934c 100644
>>> --- a/Documentation/devicetree/bindings/iio/adc/adc.yaml
>>> +++ b/Documentation/devicetree/bindings/iio/adc/adc.yaml
>>> @@ -73,6 +73,19 @@ properties:
>>> device design and can interact with other characteristics such as
>>> settling time.
>>>
>>> + reference-source:
>>
>> Since this is an array, the name should be `reference-sources`.
>>
>>> + $ref: /schemas/types.yaml#/definitions/string-array
>>> + maxItems: 2
>>> + minItems: 1
>>
>> Maybe minItems here is OK, but I don't think we should put maxItems here.
>> This way, it stays more flexible for other use cases.
>
> I'm curious. What other usecases did you have in mind?

I didn't have something specific in mind, but in Kurt's ADS1263 series, we
actually have a case with 3 values for this property already, ADC1 positive,
ADC1 negative and ADC2.

>
>>
>>> + description:
>>> + Indicates the voltage reference source or sources for this channel. Some
>>> + ADCs usually allow choosing between internal reference sources or a pair
>>> + of external pins.
>>> +
>>> + If a single value is provided, it represents a single voltage reference
>>> + source. If two values are provided, the first one corresponds to the
>>> + positive source and the second to the negative source.
>>> +
>>> anyOf:
>>> - oneOf:
>>> - required:
>>>
>>
>