From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Jonathan Santos <Jonathan.Santos@analog.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, cosmin.tanislav@analog.com,
lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org,
dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 2/3] iio: adc: ad4130: introduce chip info for future multidevice support
Date: Mon, 2 Mar 2026 14:39:23 +0200 [thread overview]
Message-ID: <aaWE-0WSaS6UNcSb@ashevche-desk.local> (raw)
In-Reply-To: <b95a029f836a1d2d125f5beccf5290cfcf32c725.1772078999.git.Jonathan.Santos@analog.com>
On Sat, Feb 28, 2026 at 09:38:53AM -0300, Jonathan Santos wrote:
> Introduce a chip_info structure to abstract device-specific parameters
> and prepare the driver for supporting multiple AD4130 family variants.
...
> +struct ad4130_chip_info {
> + const char *name;
> + unsigned int max_analog_pins;
> + const struct iio_info *info;
> + const unsigned int *reg_size;
> + const unsigned int reg_size_length;
> +};
Is `pahole` okay with the chosen layout?
...
> static const struct of_device_id ad4130_of_match[] = {
> - {
> - .compatible = "adi,ad4130",
> - },
> + { .compatible = "adi,ad4130", .data = &ad4130_8_chip_info },
Why touching the rest? Isn't just fine to add
.data = ...,
?
> { }
> };
...
> +static const struct spi_device_id ad4130_id_table[] = {
> + { "ad4130", (kernel_ulong_t)&ad4130_8_chip_info },
> + { }
> +};
> +MODULE_DEVICE_TABLE(spi, ad4130_id_table);
> + .id_table = ad4130_id_table,
Strictly speaking this can be a precursor change, while here you just add a
driver_data to it.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-03-02 12:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-28 12:38 [PATCH 0/3] iio: adc: ad4130: Add support for AD4129-4/8, AD4130-4, and AD4131-4/8 Jonathan Santos
2026-02-28 12:38 ` [PATCH 1/3] dt-bindings: iio: adc: ad4130: Add new supported parts Jonathan Santos
2026-03-03 6:50 ` Krzysztof Kozlowski
2026-02-28 12:38 ` [PATCH 2/3] iio: adc: ad4130: introduce chip info for future multidevice support Jonathan Santos
2026-03-02 12:39 ` Andy Shevchenko [this message]
2026-02-28 12:39 ` [PATCH 3/3] iio: adc: ad4130: add new supported parts Jonathan Santos
2026-03-02 12:51 ` Andy Shevchenko
2026-03-07 16:27 ` David Lechner
2026-03-07 17:01 ` Jonathan Cameron
2026-03-07 14:20 ` Jonathan Cameron
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=aaWE-0WSaS6UNcSb@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=Jonathan.Santos@analog.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=cosmin.tanislav@analog.com \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/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