From: "Kurt Borja" <kuurtb@gmail.com>
To: "David Lechner" <dlechner@baylibre.com>,
"Kurt Borja" <kuurtb@gmail.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Tobias Sperling" <tobias.sperling@softing.com>
Cc: "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,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH 0/2] iio: Add support for TI ADS1X18 ADCs
Date: Fri, 21 Nov 2025 18:28:10 -0500 [thread overview]
Message-ID: <DEERGRDZ0TM4.NZ6R9JWCSQPL@gmail.com> (raw)
In-Reply-To: <05fae891-a4e6-439d-97da-6259370f68b5@baylibre.com>
Hi David,
On Fri Nov 21, 2025 at 5:32 PM -05, David Lechner wrote:
> On 11/21/25 11:16 AM, Kurt Borja wrote:
>> Hi,
>>
>> This series adds a new driver for TI ADS1X18 SPI devices.
>>
>> This is my first time contributing to the IIO subsystem and making
>> dt-bindings documentation, so (don't) go easy on me :p.
>
> I actually had these parts on my radar, so happy to help you out.
> Unfortunately, I don't have the hardware for testing though.
>
> The first thing I was going to do was check the existing drivers
> to make sure that there isn't one already that has a compatible
> register layout. I have a feeling we won't find one, but would be
> good to mention that in the cover to justify adding a new driver.
The closest driver I could find was the ti-ads1015 I2C driver. It has
the same register map and similar specs. Although I think we can adapt
it to be "compatible", I chose to do a different driver for a few
reasons:
- ads1015 and compatible devices have a separate DRDY interrupt line.
- The ti-ads1015 driver doesn't support the DRDY interrupt (sleeps
until data is ready and it doesn't have an iio_trigger).
- To correctly handle the DOUT/DRDY line we need to manually control
the spi_bus_lock. And we do it differently based on which IIO device
mode we are operating on, so it would be difficult to stuff this
logic into regmap_bus callbacks alone.
- IMO the end result of merging these drivers would be too messy.
This is just my opinion though, so let me know what you think. If do
agree I will add some of this points in the patch changelog!
>
> There are a couple of similar TI ADCs on the mailing list right
> now, but they are IMHO just slightly too different to share a
> driver, but would be good to look at just to make things are
> consistent on a high level.
Yes, the other two TI ADCs, ADS1120 and ADS131M02 are very different
devices.
>
>>
>> As explained in Patch 2 changelog, the DRDY interrupt line is shared
>> with the MOSI pin. This awkward quirk is also found on some Analog
>> Devices sigma-delta SPI ADCs, so the interrupt and trigger design is
>> inspired by those.
>
> Yup, that seems to be the best way we know how to handle this.
--
~ Kurt
next prev parent reply other threads:[~2025-11-21 23:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-21 17:16 [PATCH 0/2] iio: Add support for TI ADS1X18 ADCs Kurt Borja
2025-11-21 17:16 ` [PATCH 1/2] dt-bindings: iio: adc: Add TI ADS1018/ADS1118 Kurt Borja
2025-11-21 18:30 ` Rob Herring (Arm)
2025-11-21 19:10 ` Krzysztof Kozlowski
2025-11-21 20:56 ` Kurt Borja
2025-11-21 22:40 ` David Lechner
2025-11-22 0:25 ` Kurt Borja
2025-11-22 9:34 ` Krzysztof Kozlowski
2025-11-22 15:09 ` David Lechner
2025-11-22 16:14 ` Krzysztof Kozlowski
2025-11-21 22:32 ` David Lechner
2025-11-22 0:26 ` Kurt Borja
2025-11-21 17:16 ` [PATCH 2/2] iio: adc: Add ti-ads1x18 driver Kurt Borja
2025-11-21 22:33 ` David Lechner
2025-11-22 0:24 ` Kurt Borja
2025-11-22 15:56 ` David Lechner
2025-11-26 20:41 ` Kurt Borja
2025-11-22 10:31 ` kernel test robot
2025-11-21 22:32 ` [PATCH 0/2] iio: Add support for TI ADS1X18 ADCs David Lechner
2025-11-21 23:28 ` Kurt Borja [this message]
2025-11-22 0:02 ` David Lechner
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=DEERGRDZ0TM4.NZ6R9JWCSQPL@gmail.com \
--to=kuurtb@gmail.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=tobias.sperling@softing.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).