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 1/3] iio: adc: ltc2309: introduce chip_info structure
Date: Fri, 20 Mar 2026 16:44:06 +0200 [thread overview]
Message-ID: <ab1dNoC6dg4X-Yml@ashevche-desk.local> (raw)
In-Reply-To: <20260320140819.191700-2-carlosjr.jones@analog.com>
On Fri, Mar 20, 2026 at 10:08:17PM +0800, Carlos Jones Jr wrote:
> This is a preparatory patch that introduces a chip_info structure
> to the LTC2309 driver to facilitate adding support for additional
> chip variants with different channel configurations and timing
> requirements.
>
> The chip_info structure contains chip-specific data including
> the channel specifications, number of channels, and read delay
> timing. This change does not modify the existing LTC2309
> functionality.
...
> struct ltc2309 {
> struct device *dev;
> struct i2c_client *client;
> struct mutex lock; /* serialize data access */
> int vref_mv;
> + const struct ltc2309_chip_info *chip_info;
> };
Have you checked the layout with `pahole` tool? Does it agree with your choice?
...
> + if (ltc2309->chip_info->read_delay_us)
> + usleep_range(ltc2309->chip_info->read_delay_us,
> + ltc2309->chip_info->read_delay_us * 2);
fsleep()
...
> +static const struct ltc2309_chip_info ltc2309_chip_info = {
> + .channels = ltc2309_channels,
> + .num_channels = ARRAY_SIZE(ltc2309_channels),
Perhaps you also want to add (currently missing?) array_size.h.
> + .read_delay_us = 0,
Unneeded.
> +};
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-03-20 14:44 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 [this message]
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
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=ab1dNoC6dg4X-Yml@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