lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251227181808.3dbe5b0a@jic23-huawei>
Date: Sat, 27 Dec 2025 18:18:08 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Kyle Hsieh <kylehsieh1995@...il.com>
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 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.

> ---
>  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

Powered by Openwall GNU/*/Linux Powered by OpenVZ