[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAF7HswMKGCt_HWMQWxm2G0hxqk6-2GHRDCfYF+vow5srmFQvPw@mail.gmail.com>
Date: Tue, 30 Dec 2025 09:13:20 +0800
From: Kyle Hsieh <kylehsieh1995@...il.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: Lars-Peter Clausen <lars@...afoo.de>, Michael Hennerich <Michael.Hennerich@...log.com>,
David Lechner <dlechner@...libre.com>, Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Liam Beguin <liambeguin@...il.com>, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] iio: adc: ltc2309: add support for ltc2305
On Sun, Dec 28, 2025 at 2:18 AM Jonathan Cameron <jic23@...nel.org> wrote:
>
> On Wed, 24 Dec 2025 13:37:15 +0800
> Kyle Hsieh <kylehsieh1995@...il.com> wrote:
>
> > Add support for the 2-channel LTC2305 ADC in the existing LTC2309 driver.
> > The LTC2305 and LTC2309 share similar features: both are 12-bit,
> > low-noise, low-power SAR ADCs with an I2C interface.
> > The main difference is the number of channels: LTC2305 has 2 channels,
> > while LTC2309 has 8 channels.
> >
> > Signed-off-by: Kyle Hsieh <kylehsieh1995@...il.com>
> Hi Kyle
>
> This is a fairly small patch, so don't bother doing it this time, but
> for future reference, if you are doing a refactor to enable something new
> split it into a refactor patch (which makes no operational changes) and
> a new stuff patch. Here first of those patches would introduce the chip_info
> structure but only for existing supported devices. That can be reviewed
> easily to make sure there are not functional changes. The second patch then
> adds the entries for the new device (which can be checked against the datasheet).
>
> When it is very small, in the interests of expediency we sometimes don't
> worry too much about the ideal formation of patches.
>
> In line I mention that the ltc2301 would be very easy to add as well if you
> want to do so. Otherwise looks good to me. I'll leave it on list a little
> while though before applying.
Hi Jonathan,
Thanks for the review and feedback.
I appreciate the suggestions regarding patch splitting for future submissions,
and the tip about LTC2301 support.
I will keep that in mind for future work.
Best regards,
Kyle
>
> > ---
> > drivers/iio/adc/ltc2309.c | 51 ++++++++++++++++++++++++++++++++++++++++++-----
> > 1 file changed, 46 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/iio/adc/ltc2309.c b/drivers/iio/adc/ltc2309.c
> > index 5f0d947d0615..0cf9bcae36c8 100644
> > --- a/drivers/iio/adc/ltc2309.c
> > +++ b/drivers/iio/adc/ltc2309.c
> > @@ -1,8 +1,10 @@
> > // SPDX-License-Identifier: GPL-2.0
> > /*
> > + * The LTC2305 is a 2-Channel, 12-Bit SAR ADC with an I2C Interface.
> > * The LTC2309 is an 8-Channel, 12-Bit SAR ADC with an I2C Interface.
> > *
> > * Datasheet:
> > + * https://www.analog.com/media/en/technical-documentation/data-sheets/23015fb.pdf
>
> If you wanted to, it should be trivial to also support the 2301 (I looked given the
> odd datasheet file name!) For families of parts it is common to add support based
> on only have access to a small subset.
>
>
> > * https://www.analog.com/media/en/technical-documentation/data-sheets/2309fd.pdf
Powered by blists - more mailing lists