From: Jonathan Cameron <jic23@kernel.org>
To: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.com>
Cc: "Nuno Sá" <nuno.sa@analog.com>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"David Lechner" <dlechner@baylibre.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux@analog.com, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 07/13] iio: imu: adis16550: Simplify device abstraction
Date: Wed, 24 Jun 2026 18:47:18 +0100 [thread overview]
Message-ID: <20260624184718.51755e2a@jic23-huawei> (raw)
In-Reply-To: <d20edfa8ce9685c6c3d2654186e9b80625c61e24.1781883685.git.u.kleine-koenig@baylibre.com>
On Fri, 19 Jun 2026 17:54:35 +0200
Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> wrote:
> The driver supports a single chip variant only. Simplify the driver by
> hard-coding the device properties instead of using the id_table's
> abstraction for a single chip type and a lookup in a table with only one
> entry.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
For this one I'd like some feedback from Analog people.
The reason being that we could do similar to Andy's suggestion for the
tsc2046 and rip out the chip_info structure in favour of hard coding everything
in there. However, if we know there are similar parts and that their is
some plan to add support for them - I'd rather not have the churn of ripping
it out only to revert a little later.
So Nuno, Michael etc, where do we think this one is going?
(and yes I'm too busy / lazy / behind on review to go look for parts that look similar!)
Jonathan
> ---
> drivers/iio/imu/adis16550.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/iio/imu/adis16550.c b/drivers/iio/imu/adis16550.c
> index 75679612052f..0fd18e16942f 100644
> --- a/drivers/iio/imu/adis16550.c
> +++ b/drivers/iio/imu/adis16550.c
> @@ -1064,9 +1064,8 @@ static int adis16550_probe(struct spi_device *spi)
> return -ENOMEM;
>
> st = iio_priv(indio_dev);
> - st->info = spi_get_device_match_data(spi);
> - if (!st->info)
> - return -EINVAL;
> + st->info = &adis16550_chip_info;
> +
> adis = &st->adis;
> indio_dev->name = st->info->name;
> indio_dev->channels = st->info->channels;
> @@ -1117,13 +1116,13 @@ static int adis16550_probe(struct spi_device *spi)
> }
>
> static const struct spi_device_id adis16550_id[] = {
> - { "adis16550", (kernel_ulong_t)&adis16550_chip_info},
> + { .name = "adis16550" },
> { }
> };
> MODULE_DEVICE_TABLE(spi, adis16550_id);
>
> static const struct of_device_id adis16550_of_match[] = {
> - { .compatible = "adi,adis16550", .data = &adis16550_chip_info },
> + { .compatible = "adi,adis16550" },
> { }
> };
> MODULE_DEVICE_TABLE(of, adis16550_of_match);
next prev parent reply other threads:[~2026-06-24 17:47 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-19 15:54 [PATCH v1 00/13] iio: Use named initializers for device_id structures Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 01/13] iio: Initialize i2c_device_id arrays using member names (part 2) Uwe Kleine-König (The Capable Hub)
2026-06-24 17:34 ` Jonathan Cameron
2026-06-19 15:54 ` [PATCH v1 02/13] iio: adc: ti-tsc2046: Simplify device abstraction Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 03/13] iio: adc: ti-tsc2046: Drop unused member from private data Uwe Kleine-König (The Capable Hub)
2026-06-22 10:30 ` Andy Shevchenko
2026-06-22 13:32 ` Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 04/13] iio: adc: max1241: Simplify device abstraction Uwe Kleine-König (The Capable Hub)
2026-06-24 17:37 ` Jonathan Cameron
2026-06-19 15:54 ` [PATCH v1 05/13] iio: dac: max5522: " Uwe Kleine-König (The Capable Hub)
2026-06-24 17:38 ` Jonathan Cameron
2026-06-19 15:54 ` [PATCH v1 06/13] iio: frequency: ad9523: Simplify driver a bit Uwe Kleine-König (The Capable Hub)
2026-06-24 17:43 ` Jonathan Cameron
2026-06-19 15:54 ` [PATCH v1 07/13] iio: imu: adis16550: Simplify device abstraction Uwe Kleine-König (The Capable Hub)
2026-06-24 17:47 ` Jonathan Cameron [this message]
2026-06-19 15:54 ` [PATCH v1 08/13] iio: magnetometer: hmc5843: " Uwe Kleine-König (The Capable Hub)
2026-06-24 17:48 ` Jonathan Cameron
2026-06-19 15:54 ` [PATCH v1 09/13] iio: accel: bmc150: Explicitly set spi .driver_data Uwe Kleine-König (The Capable Hub)
2026-06-24 17:50 ` Jonathan Cameron
2026-06-19 15:54 ` [PATCH v1 10/13] iio: Drop unused assignment of spi_device_id driver data Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 11/13] iio: Initialize spi_device_id arrays using member names Uwe Kleine-König (The Capable Hub)
2026-06-19 20:19 ` Linus Walleij
2026-06-24 17:52 ` Jonathan Cameron
2026-06-19 15:54 ` [PATCH v1 12/13] staging: iio: Drop unused assignment of spi_device_id driver data Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 13/13] staging: iio: Initialize spi_device_id arrays using member names Uwe Kleine-König (The Capable Hub)
2026-06-24 17:54 ` Jonathan Cameron
2026-06-26 13:18 ` Uwe Kleine-König (The Capable Hub)
2026-06-22 11:43 ` [PATCH v1 00/13] iio: Use named initializers for device_id structures Nuno Sá
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=20260624184718.51755e2a@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@analog.com \
--cc=nuno.sa@analog.com \
--cc=u.kleine-koenig@baylibre.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