Devicetree
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Kurt Borja" <kuurtb@gmail.com>
Cc: "Krzysztof Kozlowski" <krzk@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Linus Walleij" <linusw@kernel.org>,
	"Bartosz Golaszewski" <brgl@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org
Subject: Re: [PATCH 2/5] iio: adc: Add ti-ads1262 driver
Date: Mon, 22 Jun 2026 10:47:28 +0100	[thread overview]
Message-ID: <20260622104728.039a5ea2@jic23-huawei> (raw)
In-Reply-To: <DJF5ATR2RPDJ.3LSN8DY58E6RO@gmail.com>

On Sun, 21 Jun 2026 19:18:33 -0500
"Kurt Borja" <kuurtb@gmail.com> wrote:

> On Sun Jun 21, 2026 at 9:33 AM -05, Jonathan Cameron wrote:
> > On Mon, 15 Jun 2026 06:30:28 +0200
> > Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >  
> >> On 14/06/2026 22:56, Kurt Borja wrote:  
> >> > On Sat Jun 13, 2026 at 1:59 PM -05, Krzysztof Kozlowski wrote:
> >> > 
> >> > [...]
> >> >     
> >> >> Functions used by probe() should be before probe(), not somewhere in the
> >> >> middle of the code. IOW, entire probe is together.    
> >> > 
> >> > I they all are, it's just that regmap stuff takes a huge chunk. I'll
> >> > check how to reorganize.
> >> > 
> >> > [...]
> >> >     
> >> >>> +static const struct of_device_id ads1262_of_match[] = {
> >> >>> +	{ .compatible = "ti,ads1262" },
> >> >>> +	{ .compatible = "ti,ads1263" },    
> >> >>
> >> >> So devices are fully compatible? Then it should be expressed in the
> >> >> binding and drop one entry here.    
> >> > 
> >> > Not fully compatible as Jonathan said. One is a subset of the other.    
> >> 
> >> This is THE meaning of compatible!  
> >
> > This one I'm in agreement with. It is a strict subset, so should be
> > using a fallback.  If the fallback is used, you just get support of the
> > stuff in the simpler chip (or if you can override it with a chip ID
> > you might still 'upgrade' to the more complex driver support).
> > If you do end up with properties that only apply to 'new' parts of
> > the more complex chip then they should be verified as part of the
> > binding (assuming you can do that without the verifier complaining
> > - I haven't checked!)  
> 
> In v1 I had the "adc" subnode which was specific to ADS1263. Then I
> agreed to drop the subnode but I'm having second thoughts...
> 
> If we dropped it, then we would still have some specific stuff.
> #io-channel-cells would be "const: 2" in ADS1263 chips. Also ADS1263's
> channels would have an extra ti,vref-adc2 prop, for ADC2 voltage
> reference selection. I should maybe also add a vref-adc2-supply.
> 
> Maybe it's better to keep the subnode or, again, go for something like:
> 
>     spi {
>         multi-adc@0 {
>             adc@0 {
>                 ...
>                 vref-suppy = <&adc1-vref>;
> 
>                 channel@0 {
>                     ...
>                     reference-source = <ADS1262_VREF_AIN0_AIN1>;
>                 };
>             };
>             adc@1 {
>                 ...
>                 vref-suppy = <&adc2-vref>;
> 
>                 channel@0 {
>                     ...
>                     reference-source = <ADS1262_VREF_AIN2_AIN3>;
>                 };
>             };
>         };
>     };
> 
> In this case we would have to kinda duplicate channel description, but I
> don't think it's that bad.
> 
> Jonathan, Krzysztof, David, thoughts?
> 
> IMO the ADC2 specific voltage reference stuff is a strong argument for a
> subnode or the above solution.

Given you end up with channel specific stuff that differs I think it probably
makes sense - though I do wonder a bit if that is real.  What's the use case
for using a different reference for the monitoring / debug than the main one?
I could imagine some dynamic use where you want to sanity check against
a wider reference range, but maybe that needs userspace control rather than
in here?  

Jonathan


> 
> >
> > The SLF3F discussion is about (to me) less obvious case of not a strict
> > subset, but rather being detectable parts with different channel related
> > properties.  In that case the ID match is necessary for anything to work.
> > Anyhow, that discussion is in a different thread and not really relevant
> > here.
> >
> > Jonathan
> >  
> >> 
> >> 
> >> Best regards,
> >> Krzysztof  
> 


  reply	other threads:[~2026-06-22  9:47 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12 22:46 [PATCH 0/5] iio: adc: Add TI ADS126X ADC family support Kurt Borja
2026-06-12 22:46 ` [PATCH 1/5] dt-bindings: iio: adc: Add TI ADS126x ADC family Kurt Borja
2026-06-12 22:53   ` sashiko-bot
2026-06-13 18:54   ` Krzysztof Kozlowski
2026-06-14 20:53     ` Kurt Borja
2026-06-14 21:37       ` David Lechner
2026-06-14 21:57         ` Kurt Borja
2026-06-15  0:06           ` David Lechner
2026-06-15  4:34       ` Krzysztof Kozlowski
2026-06-15  4:40         ` Kurt Borja
2026-06-12 22:46 ` [PATCH 2/5] iio: adc: Add ti-ads1262 driver Kurt Borja
2026-06-12 23:01   ` sashiko-bot
2026-06-13 19:00     ` Krzysztof Kozlowski
2026-06-14 20:58       ` Kurt Borja
2026-06-13 13:45   ` Jonathan Cameron
2026-06-13 14:06     ` Jonathan Cameron
2026-06-14 20:27     ` Kurt Borja
2026-06-21 14:25       ` Jonathan Cameron
2026-06-13 18:59   ` Krzysztof Kozlowski
2026-06-14 13:39     ` Jonathan Cameron
2026-06-15  4:33       ` Krzysztof Kozlowski
2026-06-15  4:42         ` Kurt Borja
2026-06-14 20:56     ` Kurt Borja
2026-06-15  4:30       ` Krzysztof Kozlowski
2026-06-21 14:33         ` Jonathan Cameron
2026-06-22  0:18           ` Kurt Borja
2026-06-22  9:47             ` Jonathan Cameron [this message]
2026-06-12 22:46 ` [PATCH 3/5] iio: adc: ti-ads1262: Add GPIO controller support Kurt Borja
2026-06-12 22:59   ` sashiko-bot
2026-06-13  6:23   ` Kurt Borja
2026-06-12 22:46 ` [PATCH 4/5] iio: adc: ti-ads1262: Add calibration support Kurt Borja
2026-06-12 23:02   ` sashiko-bot
2026-06-13 13:50   ` Jonathan Cameron
2026-06-14 20:31     ` Kurt Borja
2026-06-12 22:46 ` [PATCH 5/5] iio: adc: Add ti-ads1263-adc2 driver Kurt Borja
2026-06-12 23:11   ` sashiko-bot
2026-06-13 14:10   ` Jonathan Cameron
2026-06-14 20:43     ` Kurt Borja
2026-06-21 14:41       ` Jonathan Cameron
2026-06-12 23:50 ` [PATCH 0/5] iio: adc: Add TI ADS126X ADC family support David Lechner
2026-06-13  0:06   ` Kurt Borja

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=20260622104728.039a5ea2@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andy@kernel.org \
    --cc=brgl@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=kuurtb@gmail.com \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    /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