Re: [PATCH v2 1/2] dt-bindings: iio: adc: ti,ads1015: Add label property
From: Jonathan Cameron
Date: Fri Sep 04 2026 - 22:01:18 EST
On Thu, 3 Sep 2026 10:30:01 -0500
David Lechner <dlechner@xxxxxxxxxxxx> wrote:
> On 9/3/26 10:19 AM, Flaviu Nistor wrote:
> > On Wed, Sep 2, 2026 at 9:31 PM, David Lechner wrote:
> >> On 9/2/26 12:22 PM, Flaviu Nistor wrote:
> >>> Add support for an optional label property per channel similar to other adc
> >>> chips. This allows assigning distinct names for each channel which can
> >>> match the schematic signal name.
> >>>
> >>> Signed-off-by: Flaviu Nistor <flaviu.nistor@xxxxxxxxx>
> >>> ---
> >>> Documentation/devicetree/bindings/iio/adc/ti,ads1015.yaml | 6 ++++++
> >>> 1 file changed, 6 insertions(+)
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads1015.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads1015.yaml
> >>> index 718f633c6e04..777a75c21d7f 100644
> >>> --- a/Documentation/devicetree/bindings/iio/adc/ti,ads1015.yaml
> >>> +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads1015.yaml
> >>> @@ -66,6 +66,11 @@ patternProperties:
> >>> - minimum: 0
> >>> maximum: 7
> >>>
> >>> + label:
> >>> + $ref: /schemas/types.yaml#/definitions/string
> >>> + description:
> >>> + A descriptive name for this channel, like "vcc_ram" or "CH3".
> >>> +
> >>
> >> Apparently this chip has quite old dt-bindings. Normally, we would have
> >> included adc.yaml to get this and other channel properties.
Quite a lot of bindings predate that generalization work :(
> >>
> >> And we would have used diff-channels and single-channel from that to
> >> describe which pins are associated with which channel rather than having
> >> a magic number for reg. And the ti,datarate looks suspicious as sampling
> >> frequency is usually we control at runtime.
> >>
> >> Anyway, none of that is really relevant to this patch. We'll see what
> >> Jonathan says about using adc.yaml here vs. adding a label property.
Given it's only a single property and label is pretty universal
I'm fine with just adding it here without the reference to adc.yaml.
DT binding reviewers may disagree however!
J
> >>
> >
> > Thanks for your feedback. I can also use:
> >
> > $ref: adc.yaml
> > unevaluatedProperties: false
> >
> > and move additionalProperties: false at the end of patternProperties block.
>
> It can't have both unevaluatedProperties and additionalProperties (hopefully
> the dt_binding_check would catch that).
>
> > Any other idea?
> >
> > Best regards,
> > Flaviu Nistor
> >
> >>> ti,gain:
> >>> $ref: /schemas/types.yaml#/definitions/uint32
> >>> minimum: 0
> >>> @@ -125,6 +130,7 @@ examples:
> >>> reg = <4>;
> >>> ti,gain = <3>;
> >>> ti,datarate = <5>;
> >>> + label = "CH3";
> >>> };
> >>> };
> >>> };
>