[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e1e38f64-4cf4-4f12-bf9d-e7520d4e5721@baylibre.com>
Date: Wed, 8 Jan 2025 10:48:18 -0600
From: David Lechner <dlechner@...libre.com>
To: Jonathan Cameron <jic23@...nel.org>,
Antoniu Miclaus <antoniu.miclaus@...log.com>
Cc: robh@...nel.org, conor+dt@...nel.org, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pwm@...r.kernel.org, Conor Dooley <conor.dooley@...rochip.com>
Subject: Re: [PATCH v9 7/8] dt-bindings: iio: adc: add ad4851
On 12/23/24 5:40 AM, Jonathan Cameron wrote:
> On Fri, 20 Dec 2024 14:01:33 +0200
> Antoniu Miclaus <antoniu.miclaus@...log.com> wrote:
>
>> Add devicetree bindings for ad485x family.
>>
>> Reviewed-by: Conor Dooley <conor.dooley@...rochip.com>
>> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@...log.com>
> Mixed single end and differential channel devices that have per channel
> child nodes need a more complex description to avoid reg have different
> and possibly clashing meanings for the two types of channel.
>
> See inline.
>
...
>> +patternProperties:
>> + "^channel(@[0-7])?$":
>> + $ref: adc.yaml
>> + type: object
>> + description: Represents the channels which are connected to the ADC.
>> +
>> + properties:
>> + reg:
>> + description: The channel number in single-ended mode.
>
> And what is it in differential mode? (usually just an index).
> Which is a problem if you have a mix. That's why we added
> single-channel.
This chip isn't a mix-and match like many chips with muxes that use this binding
so I think it should just be diff-channels = <0 0>; similar to adi,ad7606. The
pins on the chip are labeled IN0+ and IN0- so it makes sense that both the
positive and negative inputs to be 0.
So, this should be fine with or without a single-channel property since reg
should always have the same number as diff-channels and single-channel.
>
> So for devices where reg isn't enough, you can use:
> reg: index of channel, not real meaning just makes them unique.
> single-channel: The channel number for single ended.
> diff-channels: The channel numbers for differential channels.
>
>> + minimum: 0
>> + maximum: 7
>> +
>> + diff-channels: true
>
> Should be constraints / information on the values possible.
> I've no idea what the 8 is in your example for instance.
>
Powered by blists - more mailing lists