From: Jonathan Cameron <jic23@kernel.org>
To: Stephan Costa Barros <stephanbrrs8@gmail.com>
Cc: "David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Mike Looijmans" <mike.looijmans@topic.nl>,
"Andy Shevchenko" <andriy.shevchenko@intel.com>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 6/6] iio: adc: ti-ads1298: add ADS1299 support
Date: Mon, 2 Nov 2026 00:14:05 +0000 [thread overview]
Message-ID: <20261102001405.5798b110@jic23-hlaptop> (raw)
In-Reply-To: <20261028022652.31121-1-stephanbrrs8@gmail.com>
On Tue, 27 Oct 2026 23:26:52 -0300
Stephan Costa Barros <stephanbrrs8@gmail.com> wrote:
> On Sun, 25 Oct 2026 23:34:29 +0000, Jonathan Cameron wrote:
> > A few things in here feel like they should be in precursor
> > patches because the implication is they apply just as much
> > to improving support for the ads1298 as they do for the
> > new device.
>
> Agreed. DVDD and PWDN become ADS129x patches, binding and driver, before
> the ADS1299 ones.
>
> > > + if (FIELD_GET(ADS1299_MASK_ID_DEVICE, id) != ADS1299_ID_DEVICE ||
> > > + nu_ch > 2)
> > > + return dev_err_probe(dev, -ENODEV, "Unknown ID: 0x%x\n", id);
> > How do backwards compatible parts with fallback compatible of ads1299 work?
> >
> > Generally we don't reject on simply an who am I value mismatch.
> > Note the existing driver may need relaxing on that point - we used
> > to do this before DT maitainers pointed out what it broke!
>
> Today that works only within a family: the channel count comes from the
> ID, so ti,ads1299 serves the -4 and -6, and ti,ads1298 the ADS1294/6
> and the R parts. A part with a new ID is refused, as the existing driver
> does too.
>
> For v3 I'd do, in a precursor patch for the existing driver: the
> compatible's chip info is what the driver trusts. If the ID is a known
> part of that family, it still gives the channel count and the name; if
> not (another family, or a reserved channel code), the driver warns and
> goes on with the compatible's chip info. The channel count from the ID
> has to stay, since ti,ads1298 has been the only compatible and existing
> boards with an ADS1294 or ADS1296 depend on it.
>
> Does that match what you have in mind?
Yes. That sounds like the best way to handle this mix of
discoverable and not.
>
> > > + /* The ADS1299 comes out of reset with its inputs shorted */
> >
> > What is the case for the ADS1298 - is this just harmless or does
> > that have similar behavior?
>
> Harmless. On the ADS129x CHnSET resets to 00h, normal electrode input,
> so the write changes nothing. On the ADS1299 it resets to 61h, input
> shorted, and without the write each channel reads its own shorted input.
> I'll make it ADS1299 only, through chip info, unless you prefer it
> unconditional.
>
> > > + for (i = 0; i < indio_dev->num_channels; i++) {
> >
> > for (unsigned int i = 0;...
>
> Will do.
>
> Thanks,
> Stephan
>
prev parent reply other threads:[~2026-11-02 0:14 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-24 23:13 [PATCH v2 0/6] iio: adc: ti-ads1298: fixes, and " Stephan Costa Barros
2026-10-24 23:13 ` [PATCH v2 1/6] iio: adc: ti-ads1298: fix the data read path Stephan Costa Barros
2026-10-25 20:14 ` Andy Shevchenko
2026-10-28 2:39 ` Stephan Costa Barros
2026-10-25 23:06 ` Jonathan Cameron
2026-10-28 2:19 ` Stephan Costa Barros
2026-11-02 0:08 ` Jonathan Cameron
[not found] ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.ed949772-52db-42ef-8d2c-847df5a618d7.250833dd-44db-45a9-a0fe-3a8f8120e7b7@emailsignatures365.codetwo.com>
2026-11-02 6:02 ` Mike Looijmans
2026-10-24 23:13 ` [PATCH v2 2/6] iio: adc: ti-ads1298: fix power-up and clock handling Stephan Costa Barros
2026-10-25 20:18 ` Andy Shevchenko
2026-10-25 23:07 ` Jonathan Cameron
2026-10-26 6:27 ` Mike Looijmans
2026-10-28 2:19 ` Stephan Costa Barros
2026-10-28 6:47 ` Mike Looijmans
2026-10-24 23:13 ` [PATCH v2 3/6] iio: adc: ti-ads1298: fix scale, ID check, regmap and Kconfig Stephan Costa Barros
2026-10-25 23:12 ` Jonathan Cameron
2026-10-24 23:13 ` [PATCH v2 4/6] iio: adc: ti-ads1298: prepare for more chip families Stephan Costa Barros
2026-10-25 20:27 ` Andy Shevchenko
2026-10-28 2:22 ` Stephan Costa Barros
2026-10-25 23:26 ` Jonathan Cameron
2026-10-28 2:22 ` Stephan Costa Barros
2026-10-24 23:13 ` [PATCH v2 5/6] dt-bindings: iio: adc: ti,ads1298: add ADS1299 Stephan Costa Barros
2026-10-27 8:04 ` Krzysztof Kozlowski
2026-10-24 23:13 ` [PATCH v2 6/6] iio: adc: ti-ads1298: add ADS1299 support Stephan Costa Barros
2026-10-25 20:34 ` Andy Shevchenko
2026-10-28 2:30 ` Stephan Costa Barros
2026-10-25 23:34 ` Jonathan Cameron
2026-10-28 2:26 ` Stephan Costa Barros
2026-11-02 0:14 ` Jonathan Cameron [this message]
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=20261102001405.5798b110@jic23-hlaptop \
--to=jic23@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=andy@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=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.looijmans@topic.nl \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=stephanbrrs8@gmail.com \
--cc=u.kleine-koenig@baylibre.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
all inboxes | Powered by JetHome®