From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Cc: "Nicolás Antinori" <nico.antinori.7@gmail.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Andy Shevchenko" <andy@kernel.org>,
"Brigham Campbell" <me@brighamcampbell.com>,
"David Lechner" <dlechner@baylibre.com>,
"Jori Koolstra" <jkoolstra@xs4all.nl>,
"Nuno Sá" <nuno.sa@analog.com>,
"Shuah Khan" <skhan@linuxfoundation.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kernel-mentees@lists.linux.dev
Subject: Re: [PATCH v2] iio: humidity: am2315: add am2320 to i2c_device_id table
Date: Tue, 11 Aug 2026 10:38:58 +0300 [thread overview]
Message-ID: <anrRkty6ugdJUGmE@ashevche-desk.local> (raw)
In-Reply-To: <anqKwJOkl_cxzCT6@debian-BULLSEYE-live-builder-AMD64>
On Mon, Aug 10, 2026 at 11:36:48PM -0300, Marcelo Schmitt wrote:
> On 08/10, Nicolás Antinori wrote:
...
> David's comment about the IIO device name sounds appropriate.
> The am2315 driver might use a chip_info struct to hold the name of each specific design.
> There are many drivers in IIO that already have such things.
> drivers/iio/accel/adxl372_i2c.c is one example.
>
> An alternative might be to use the device id.
>
> const struct i2c_device_id *id = i2c_client_get_device_id(client);
> ...
>
> indio_dev->name = id->name;
>
> Not sure if the second option works well for both i2c and dt (probably not), so
> I'd suggest the chip_info approach if you intend to add a device tree id table.
Indeed, we suggest chip_info for the more robust approach when name is provided
via string literals independently on the ID tables (as there maybe same ID in
the tables for the slightly different devices that may be autodetected runtime,
or different IDs for the same or fully compatible component; the chip_info works
for the latter case).
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-08-11 7:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 18:32 [PATCH v2] iio: humidity: am2315: add am2320 to i2c_device_id table Nicolás Antinori
2026-08-10 18:53 ` Andy Shevchenko
2026-08-10 19:28 ` David Lechner
2026-08-11 2:36 ` Marcelo Schmitt
2026-08-11 7:38 ` Andy Shevchenko [this message]
2026-08-11 15:12 ` Nicolás Antinori
2026-08-11 15:49 ` David Lechner
2026-08-11 17:58 ` Nicolás Antinori
2026-08-11 18:06 ` David Lechner
2026-08-12 4:43 ` Jonathan Cameron
2026-08-12 15:56 ` Nicolás Antinori
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=anrRkty6ugdJUGmE@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=jkoolstra@xs4all.nl \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.schmitt1@gmail.com \
--cc=me@brighamcampbell.com \
--cc=nico.antinori.7@gmail.com \
--cc=nuno.sa@analog.com \
--cc=skhan@linuxfoundation.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;
as well as URLs for NNTP newsgroup(s).