From: "Nicolás Antinori" <nico.antinori.7@gmail.com>
To: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>
Cc: "Andy Shevchenko" <andriy.shevchenko@intel.com>,
"Marcelo Schmitt" <marcelo.schmitt1@gmail.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Brigham Campbell" <me@brighamcampbell.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: Wed, 12 Aug 2026 12:56:15 -0300 [thread overview]
Message-ID: <DKN36K6SLY15.2Z5PITE3CE9CN@gmail.com> (raw)
In-Reply-To: <20260812054339.6f58b5fd@jic23-huawei>
On Wed Aug 12, 2026 at 1:43 AM -03, Jonathan Cameron wrote:
> On Tue, 11 Aug 2026 13:06:50 -0500
> David Lechner <dlechner@baylibre.com> wrote:
>
>> On 8/11/26 12:58 PM, Nicolás Antinori wrote:
>> > On Tue Aug 11, 2026 at 12:49 PM -03, David Lechner wrote:
>> >> On 8/11/26 10:12 AM, Nicolás Antinori wrote:
>> >>> On Mon Aug 10, 2026 at 4:28 PM -03, David Lechner wrote:
>> >>>> On 8/10/26 1:32 PM, Nicolás Antinori wrote:
>> >>>>> The AM2320 is fully compatible with the AM2315 sensor in terms of I2C
>> >>>>> communication protocol and measurement conversions.
>> >>>>>
>> >>>>> Add the "am2320" entry to the i2c_device_id table.
>> >>>>
>> >>>> Interesting. No devicetree bindings for this one? What kind of
>> >>>> system is it on?
>> >>>>
>> >>>
>> >>> I am testing this on a Raspberry Pi 3b mounted on a protoboard.
>> >>
>> >> How do you tell the RPi to bind the driver?
>> >>
>> >> Since Raspberry Pi is ARM-based, usually we would use devicetree
>> >> overlay to do this, which would mean that we should write a
>> >> dt-bindings .yaml file for these chips.
>> >
>> > I do it manually.
>> >
>> > I use that RPi for development, at the moment the kernel I am using is
>> > 7.2.0-rc6-v8+ with CONFIG_AM2315=m. When I need to use the AM2320 I
>> > modprobe it with:
>> >
>> > $ sudo modprobe am2315
>> >
>> > And then
>> >
>> > $ sudo bash -c "echo am2315 0x5c > /sys/bus/i2c/devices/i2c-1/new_device"
>> >
>> > (With the modifications I made ... echo am2320 ... works as well)
>> > The pins for i2c I am using are GPIO 2 (SDA) and GPIO 3 (SCL).
>> >
>> > If a dt-binding yaml is needed I can send another patch with it!
>> >
>> >
>>
>> Yes please. It will make it easier for others to use as well.
>
> I think (from a quick bit of googling) that these two parts are
> at least 'kind of' the same thing with different packaging.
> The name is a nice to have and given the packaging may I guess
> affect the signal and how it is used it probably makes sense
> to add it.
>
> They only have 4 pins. Power, ground, SCL and SDA. So it
> is a rare device simple enough that I think an entry in trivial-devices.yaml
> is probably sufficient.
>
> Ideally add an of_device_id table, even though this will work fine
> by the fallback path that uses the i2c_device_id table
>
> Jonathan
>
>>
Thank you all for the feedback. I've added of_device_id table, chip_data
struct (and assign the name from there), and added "aosong,am2315" and
"aosong,am2320" to trivial-devices.yml.
I'll wait a few days to send v3 in case something else comes up.
prev parent reply other threads:[~2026-08-12 15:56 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
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 [this message]
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=DKN36K6SLY15.2Z5PITE3CE9CN@gmail.com \
--to=nico.antinori.7@gmail.com \
--cc=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=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