From: Jonathan Cameron <jic23@kernel.org>
To: Conor Dooley <conor@kernel.org>
Cc: David Lechner <dlechner@baylibre.com>,
Alisa-Dariana Roman <alisadariana@gmail.com>,
michael.hennerich@analog.com, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
alexandru.tachici@analog.com, lars@metafoo.de, robh@kernel.org,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
lgirdwood@gmail.com, broonie@kernel.org, andy@kernel.org,
nuno.sa@analog.com, marcelo.schmitt@analog.com,
bigunclemax@gmail.com, okan.sahin@analog.com,
fr0st61te@gmail.com, alisa.roman@analog.com,
marcus.folkesson@gmail.com, schnelle@linux.ibm.com,
liambeguin@gmail.com
Subject: Re: [PATCH v7 5/6] dt-bindings: iio: adc: ad7192: Add AD7194 support
Date: Sat, 11 May 2024 12:29:55 +0100 [thread overview]
Message-ID: <20240511122955.2372f56e@jic23-huawei> (raw)
In-Reply-To: <20240510-figure-cotton-1edeb2b92bbd@spud>
On Fri, 10 May 2024 22:26:22 +0100
Conor Dooley <conor@kernel.org> wrote:
> On Fri, May 10, 2024 at 09:21:37AM -0500, David Lechner wrote:
> > On 5/10/24 5:05 AM, Alisa-Dariana Roman wrote:
> > > On 30.04.2024 20:21, Conor Dooley wrote:
> > >> On Tue, Apr 30, 2024 at 07:29:45PM +0300, Alisa-Dariana Roman wrote:
> > >>> + diff-channels:
> > >>> + description:
> > >>> + Both inputs can be connected to pins AIN1 to AIN16 by choosing the
> > >>> + appropriate value from 1 to 16.
> > >>> + items:
> > >>> + minimum: 1
> > >>> + maximum: 16
> > >>> +
> > >>> + single-channel:
> > >>> + description:
> > >>> + Positive input can be connected to pins AIN1 to AIN16 by choosing the
> > >>> + appropriate value from 1 to 16. Negative input is connected to AINCOM.
> > >>> + items:
> > >>> + minimum: 1
> > >>> + maximum: 16
> > >>
> > >> Up to 16 differential channels and 16 single-ended channels, but only 16
> > >> pins? Would the number of differential channels not max out at 8?
> > >
> > > Hello, Conor! I really appreciate the feedback!
> > >
> > > The way I thought about it, the only thing constraining the number of channels is the reg number (minimum: 0, maximum: 271). 272 channels cover all possible combinations (16*16 differential and 16 single ended) and I thought there is no need for anything stricter. I added items: minimum:1 maximum:16 to make sure the numbers are from 1 to 16, corresponding to AIN1-AIN16.
> > >
> > > Please let me know what should be improved!
> > >
> > > Kind regards,
> > > Alisa-Dariana Roman.
> > >
> >
> > Having looked at the datasheet for this and other similar chips, I agree
> > that this reasoning makes sense. Some of the similar chips that have fixed
> > channel assignments still have, e.g. a channel where + and - are both
> > AIN2 (I assume for diagnostics). So I think it makes sense to allow for
> > doing something similar here even if the most common use cases will
> > probably have at most 16 channels defined in the .dts.
>
> Actually, I think there were a bunch of whiffs on this one by either
> misreading the property in question (me) or not realising that I had done
> that and trying to explain what the possible combinations are.
> Looking at it now, I dunno wtf I was smoking because there's no way that
> this would be a functional binding if the min/max in the quote above
> constraining the number of channels. I can hardly blame y'all for that
> though, I am supposed to know how bindings work after all...
Me too :( I also failed to register this doesn't constrain
channel counts at all.
Anyhow, all's well that ends well!
J
next prev parent reply other threads:[~2024-05-11 11:30 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-30 16:29 [PATCH v7 0/6] iio: adc: ad7192: Add AD7194 support Alisa-Dariana Roman
2024-04-30 16:29 ` [PATCH v7 1/6] iio: adc: ad7192: Use standard attribute Alisa-Dariana Roman
2024-04-30 16:29 ` [PATCH v7 2/6] dt-bindings: iio: adc: ad7192: Add aincom supply Alisa-Dariana Roman
2024-04-30 16:29 ` [PATCH v7 3/6] " Alisa-Dariana Roman
2024-04-30 20:28 ` Andy Shevchenko
2024-05-01 16:54 ` David Lechner
2024-04-30 16:29 ` [PATCH v7 4/6] dt-bindings: iio: adc: Add single-channel property Alisa-Dariana Roman
2024-04-30 17:15 ` Conor Dooley
2024-04-30 16:29 ` [PATCH v7 5/6] dt-bindings: iio: adc: ad7192: Add AD7194 support Alisa-Dariana Roman
2024-04-30 17:21 ` Conor Dooley
2024-05-05 19:46 ` Jonathan Cameron
2024-05-06 15:54 ` Conor Dooley
2024-05-10 10:05 ` Alisa-Dariana Roman
2024-05-10 14:21 ` David Lechner
2024-05-10 21:26 ` Conor Dooley
2024-05-11 11:29 ` Jonathan Cameron [this message]
2024-04-30 17:26 ` Conor Dooley
2024-04-30 16:29 ` [PATCH v7 6/6] " Alisa-Dariana Roman
2024-04-30 20:33 ` Andy Shevchenko
2024-05-01 17:54 ` David Lechner
2024-05-06 13:39 ` Jonathan Cameron
2024-04-30 17:19 ` [PATCH v7 0/6] " Conor Dooley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240511122955.2372f56e@jic23-huawei \
--to=jic23@kernel.org \
--cc=alexandru.tachici@analog.com \
--cc=alisa.roman@analog.com \
--cc=alisadariana@gmail.com \
--cc=andy@kernel.org \
--cc=bigunclemax@gmail.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=fr0st61te@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=liambeguin@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.schmitt@analog.com \
--cc=marcus.folkesson@gmail.com \
--cc=michael.hennerich@analog.com \
--cc=nuno.sa@analog.com \
--cc=okan.sahin@analog.com \
--cc=robh@kernel.org \
--cc=schnelle@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).