Linux IIO development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Carlos Jones Jr <carlosjr.jones@analog.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Liam Beguin" <liambeguin@gmail.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Tobias Sperling" <tobias.sperling@softing.com>,
	"Jorge Marques" <jorge.marques@analog.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] iio: adc: ltc2309: add support for LTC2305
Date: Fri, 20 Mar 2026 16:48:35 +0200	[thread overview]
Message-ID: <ab1eQ55b_8JiyAGA@ashevche-desk.local> (raw)
In-Reply-To: <20260320140819.191700-4-carlosjr.jones@analog.com>

On Fri, Mar 20, 2026 at 10:08:19PM +0800, Carlos Jones Jr wrote:
> The LTC2305 is a 2-channel, 12-bit, fast ADC with an I2C interface,
> compatible with the LTC2309 (which has 8 channels).
> 
> This patch adds support for the LTC2305 by using the chip_info
> structure to handle the different channel configurations between the
> two variants. The LTC2305 exposes 2 single-ended channels and 2
> differential combinations.
> 
> The LTC2305 requires a 1.6μs delay between I2C write and read
> operations, which is implemented using chip-specific timing to avoid
> affecting existing LTC2309 functionality.

...

>  config LTC2309
> -	tristate "Linear Technology LTC2309 ADC driver"
> +	tristate "Linear Technology LTC2309 and similar ADC driver"
>  	depends on I2C
>  	help
> -	  Say yes here to build support for Linear Technology LTC2309, a low
> -	  noise, low power, 8-channel, 12-bit SAR ADC
> +	  Say yes here to build support for Linear Technology LTC2309 and
> +	  similar low noise, low power SAR ADCs.

No, in Kconfig help text (and possibly title above) we have to be crystal
clear for user what IPs (chips, SoCs, et cetera) are being supported by
the driver. There is no go for 'and similar'.

...

> -	ltc2309->chip_info = &ltc2309_chip_info;
> +	ltc2309->chip_info = i2c_get_match_data(client);

Strictly speaking this change with the associated ID table changes should go
in a separate patch.

...

>  static const struct of_device_id ltc2309_of_match[] = {
> -	{ .compatible = "lltc,ltc2309" },
> +	{ .compatible = "lltc,ltc2309", .data = &ltc2309_chip_info },


> +	{ .compatible = "lltc,ltc2305", .data = &ltc2305_chip_info },

Keep it ordered by the value of compatible string.

>  	{ }
>  };

...

>  static const struct i2c_device_id ltc2309_id[] = {
> -	{ "ltc2309" },
> +	{ "ltc2309", (kernel_ulong_t)&ltc2309_chip_info },
> +	{ "ltc2305", (kernel_ulong_t)&ltc2305_chip_info },
>  	{ }

In the similar way as above.

>  };

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-03-20 14:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20 14:08 [PATCH 0/3] Add support for LTC2305 Carlos Jones Jr
2026-03-20 14:08 ` [PATCH 1/3] iio: adc: ltc2309: introduce chip_info structure Carlos Jones Jr
2026-03-20 14:44   ` Andy Shevchenko
2026-03-23 10:38     ` Jones, Carlos jr
2026-03-23 11:06       ` Jones, Carlos jr
2026-03-21 12:51   ` Jonathan Cameron
2026-03-23 10:39     ` Jones, Carlos jr
2026-03-23 11:00       ` Jones, Carlos jr
2026-03-20 14:08 ` [PATCH 2/3] dt-bindings: iio: adc: lltc,ltc2497: add LTC2305 support Carlos Jones Jr
2026-03-20 17:27   ` Conor Dooley
2026-03-20 17:27     ` Conor Dooley
2026-03-23 10:39       ` Jones, Carlos jr
2026-03-20 14:08 ` [PATCH 3/3] iio: adc: ltc2309: add support for LTC2305 Carlos Jones Jr
2026-03-20 14:48   ` Andy Shevchenko [this message]
2026-03-21 12:54     ` Jonathan Cameron
2026-03-23 10:39       ` Jones, Carlos jr
2026-03-23 11:06         ` Andy Shevchenko
2026-03-23 10:39     ` Jones, Carlos jr
2026-03-20 14:50 ` [PATCH 0/3] Add " Andy Shevchenko
2026-03-23 10:39   ` Jones, Carlos jr

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=ab1eQ55b_8JiyAGA@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy@kernel.org \
    --cc=carlosjr.jones@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=jorge.marques@analog.com \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=liambeguin@gmail.com \
    --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