From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: "Lukas Metz" <lukas.metz@gmx.net>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH 1/2] iio: dac: dac8163: Add driver for DAC8163
Date: Wed, 1 Jul 2026 12:34:25 +0300 [thread overview]
Message-ID: <akTfIdkH10Qq4G16@ashevche-desk.local> (raw)
In-Reply-To: <akP2RSriqaN8qqQT@monoceros>
On Tue, Jun 30, 2026 at 07:03:01PM +0200, Uwe Kleine-König wrote:
> On Tue, Jun 23, 2026 at 06:07:27PM +0200, Lukas Metz wrote:
...
> > + { "dac7562", (kernel_ulong_t)&dacxx6x_chip_info_table[ID_DAC7562] },
> > + { "dac7563", (kernel_ulong_t)&dacxx6x_chip_info_table[ID_DAC7563] },
> > + { "dac8162", (kernel_ulong_t)&dacxx6x_chip_info_table[ID_DAC8162] },
> > + { "dac8163", (kernel_ulong_t)&dacxx6x_chip_info_table[ID_DAC8163] },
> > + { "dac8562", (kernel_ulong_t)&dacxx6x_chip_info_table[ID_DAC8562] },
> > + { "dac8563", (kernel_ulong_t)&dacxx6x_chip_info_table[ID_DAC8563] },
>
> please also use named initializers, i.e.
>
> static const struct spi_device_id dacxx6x_id_table[] = {
> { .name = "dac7562", .driver_data = (kernel_ulong_t)&dacxx6x_chip_info_table[ID_DAC7562] },
> { .name = "dac7563", .driver_data = (kernel_ulong_t)&dacxx6x_chip_info_table[ID_DAC7563] },
> { .name = "dac8162", .driver_data = (kernel_ulong_t)&dacxx6x_chip_info_table[ID_DAC8162] },
> { .name = "dac8163", .driver_data = (kernel_ulong_t)&dacxx6x_chip_info_table[ID_DAC8163] },
> { .name = "dac8562", .driver_data = (kernel_ulong_t)&dacxx6x_chip_info_table[ID_DAC8562] },
> { .name = "dac8563", .driver_data = (kernel_ulong_t)&dacxx6x_chip_info_table[ID_DAC8563] },
> { }
> };
These lines are way too long in IIO. The usual approach in this case is to have
it split on per device standalone initialisers. At the end it will look like
static const struct spi_device_id dacxx6x_id_table[] = {
{ .name = "dac7562", .driver_data = (kernel_ulong_t)&dac7562_chip_info },
{ .name = "dac7563", .driver_data = (kernel_ulong_t)&dac7563_chip_info },
{ .name = "dac8162", .driver_data = (kernel_ulong_t)&dac8162_chip_info },
{ .name = "dac8163", .driver_data = (kernel_ulong_t)&dac8163_chip_info },
{ .name = "dac8562", .driver_data = (kernel_ulong_t)&dac8562_chip_info },
{ .name = "dac8563", .driver_data = (kernel_ulong_t)&dac8563_chip_info },
{ }
};
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-07-01 9:34 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 16:07 [PATCH 0/2] Add driver for DAC8163: Lukas Metz
2026-06-23 16:07 ` [PATCH 1/2] iio: dac: dac8163: Add driver for DAC8163 Lukas Metz
2026-06-23 16:18 ` sashiko-bot
2026-06-23 18:56 ` Siratul Islam
2026-06-24 8:30 ` Lukas
2026-06-24 14:18 ` David Lechner
2026-07-02 0:32 ` Jonathan Cameron
2026-07-02 1:38 ` Jonathan Cameron
2026-06-23 19:39 ` Andy Shevchenko
2026-06-24 14:47 ` Lukas
2026-06-24 15:27 ` David Lechner
2026-06-25 6:18 ` Andy Shevchenko
2026-06-23 19:50 ` David Lechner
2026-06-30 17:03 ` Uwe Kleine-König
2026-07-01 9:34 ` Andy Shevchenko [this message]
2026-06-23 16:07 ` [PATCH 2/2] dt-bindings: iio: dac: Add DAC8163 Lukas Metz
2026-06-23 16:18 ` sashiko-bot
2026-06-23 19:17 ` David Lechner
2026-06-24 6:25 ` Lukas Metz
2026-06-24 14:14 ` David Lechner
2026-07-02 0:25 ` Jonathan Cameron
2026-06-23 19:54 ` David Lechner
2026-06-23 18:35 ` [PATCH 0/2] Add driver for DAC8163: Andy Shevchenko
2026-06-23 18:50 ` David Lechner
2026-06-23 19:40 ` Andy Shevchenko
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=akTfIdkH10Qq4G16@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.metz@gmx.net \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--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