Re: [PATCH v2 1/8] dt-bindings: iio: adc: Add reference-sources property
From: Kurt Borja
Date: Mon Jun 29 2026 - 02:50:03 EST
On Thu Jun 25, 2026 at 4:55 PM -05, David Lechner wrote:
> From: Kurt Borja <kuurtb@xxxxxxxxx>
>
> Some ADCs have configurable voltage reference sources for each channel.
>
> Signed-off-by: Kurt Borja <kuurtb@xxxxxxxxx>
> Signed-off-by: David Lechner (TI) <dlechner@xxxxxxxxxxxx>
> ---
> v2 changes (compared to Kurt's RFC v2):
> * Drop maxItems.
> * Drop 2nd paragraph of description.
> * Make reference-sources plural since it is an array.
> ---
> Documentation/devicetree/bindings/iio/adc/adc.yaml | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/adc.yaml b/Documentation/devicetree/bindings/iio/adc/adc.yaml
> index b9bc02b5b07a..12800737d4fb 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adc.yaml
> @@ -73,6 +73,14 @@ properties:
> device design and can interact with other characteristics such as
> settling time.
>
> + reference-sources:
> + $ref: /schemas/types.yaml#/definitions/string-array
> + minItems: 1
Is minItems necessary here? Its causing dt_binding_check to fail:
ti,ads1262.example.dtb: adc@0 (ti,ads1263): channel@0:reference-sources: ['ain2', 'ain3', 'ain2-ain3'] is too long
I don't really know why, but removing it fixes it and allows various
array lengths.
> + 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.
> +
> anyOf:
> - oneOf:
> - required:
--
Thanks,
~ Kurt