* [PATCH] iio: humidity: am2315: add am2320 to i2c_device_id table
@ 2026-08-05 18:37 Nicolás Antinori
2026-08-06 1:37 ` Marcelo Schmitt
2026-08-06 9:46 ` Nuno Sá
0 siblings, 2 replies; 4+ messages in thread
From: Nicolás Antinori @ 2026-08-05 18:37 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Nicolás Antinori, Andy Shevchenko, Brigham Campbell,
David Lechner, Jori Koolstra, Nuno Sá, Shuah Khan, linux-iio,
linux-kernel, linux-kernel-mentees
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.
Signed-off-by: Nicolás Antinori <nico.antinori.7@gmail.com>
---
Tested with Raspberry Pi 3b+
Used as reference AM2315 Datasheet [1] and AM2320 datasheet [2]
[1] https://cdn-shop.adafruit.com/datasheets/AM2315.pdf
[2] https://cdn-shop.adafruit.com/product-files/3721/AM2320.pdf
drivers/iio/humidity/Kconfig | 4 ++--
drivers/iio/humidity/am2315.c | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/humidity/Kconfig b/drivers/iio/humidity/Kconfig
index 54f11f000b6f..6907805945f3 100644
--- a/drivers/iio/humidity/Kconfig
+++ b/drivers/iio/humidity/Kconfig
@@ -5,13 +5,13 @@
menu "Humidity sensors"
config AM2315
- tristate "Aosong AM2315 relative humidity and temperature sensor"
+ tristate "Aosong AM2315/AM2320 relative humidity and temperature sensor"
depends on I2C
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
help
If you say yes here you get support for the Aosong AM2315
- relative humidity and ambient temperature sensor.
+ and AM2320 relative humidity and ambient temperature sensors.
This driver can also be built as a module. If so, the module will
be called am2315.
diff --git a/drivers/iio/humidity/am2315.c b/drivers/iio/humidity/am2315.c
index f29baa251f9f..5bce5eec45cc 100644
--- a/drivers/iio/humidity/am2315.c
+++ b/drivers/iio/humidity/am2315.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * Aosong AM2315 relative humidity and temperature
+ * Aosong AM2315/AM2320 relative humidity and temperature
*
* Copyright (c) 2016, Intel Corporation.
*
@@ -251,6 +251,7 @@ static int am2315_probe(struct i2c_client *client)
static const struct i2c_device_id am2315_i2c_id[] = {
{ .name = "am2315" },
+ { .name = "am2320" },
{ }
};
MODULE_DEVICE_TABLE(i2c, am2315_i2c_id);
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] iio: humidity: am2315: add am2320 to i2c_device_id table
2026-08-05 18:37 [PATCH] iio: humidity: am2315: add am2320 to i2c_device_id table Nicolás Antinori
@ 2026-08-06 1:37 ` Marcelo Schmitt
2026-08-06 9:46 ` Nuno Sá
1 sibling, 0 replies; 4+ messages in thread
From: Marcelo Schmitt @ 2026-08-06 1:37 UTC (permalink / raw)
To: Nicolás Antinori
Cc: Jonathan Cameron, Andy Shevchenko, Brigham Campbell,
David Lechner, Jori Koolstra, Nuno Sá, Shuah Khan, linux-iio,
linux-kernel, linux-kernel-mentees
Hello,
On 08/05, 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.
>
> Signed-off-by: Nicolás Antinori <nico.antinori.7@gmail.com>
> ---
> Tested with Raspberry Pi 3b+
>
> Used as reference AM2315 Datasheet [1] and AM2320 datasheet [2]
>
The two designs are pretty much the same. Skimmed through the data sheets and
spotted no relevant divergence among them. The sensor external casing/appearance
seems to be the main difference.
Few changes, new device supported. Nice patch.
Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iio: humidity: am2315: add am2320 to i2c_device_id table
2026-08-05 18:37 [PATCH] iio: humidity: am2315: add am2320 to i2c_device_id table Nicolás Antinori
2026-08-06 1:37 ` Marcelo Schmitt
@ 2026-08-06 9:46 ` Nuno Sá
2026-08-06 21:34 ` Andy Shevchenko
1 sibling, 1 reply; 4+ messages in thread
From: Nuno Sá @ 2026-08-06 9:46 UTC (permalink / raw)
To: Nicolás Antinori
Cc: Jonathan Cameron, Andy Shevchenko, Brigham Campbell,
David Lechner, Jori Koolstra, Nuno Sá, Shuah Khan, linux-iio,
linux-kernel, linux-kernel-mentees
On Wed, Aug 05, 2026 at 03:37:26PM -0300, 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.
>
> Signed-off-by: Nicolás Antinori <nico.antinori.7@gmail.com>
> ---
One minor comment from me (maybe Jonathan can tweak it while applying).
With that:
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
> Tested with Raspberry Pi 3b+
>
> Used as reference AM2315 Datasheet [1] and AM2320 datasheet [2]
>
> [1] https://cdn-shop.adafruit.com/datasheets/AM2315.pdf
> [2] https://cdn-shop.adafruit.com/product-files/3721/AM2320.pdf
>
> drivers/iio/humidity/Kconfig | 4 ++--
> drivers/iio/humidity/am2315.c | 3 ++-
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iio/humidity/Kconfig b/drivers/iio/humidity/Kconfig
> index 54f11f000b6f..6907805945f3 100644
> --- a/drivers/iio/humidity/Kconfig
> +++ b/drivers/iio/humidity/Kconfig
> @@ -5,13 +5,13 @@
> menu "Humidity sensors"
>
> config AM2315
> - tristate "Aosong AM2315 relative humidity and temperature sensor"
> + tristate "Aosong AM2315/AM2320 relative humidity and temperature sensor"
> depends on I2C
> select IIO_BUFFER
> select IIO_TRIGGERED_BUFFER
> help
> If you say yes here you get support for the Aosong AM2315
> - relative humidity and ambient temperature sensor.
> + and AM2320 relative humidity and ambient temperature sensors.
The above (same on the tristate title) does not really scale nicely and
we've seen too often already. So I use something like "... and similar
devices"
- Nuno Sá
>
> This driver can also be built as a module. If so, the module will
> be called am2315.
> diff --git a/drivers/iio/humidity/am2315.c b/drivers/iio/humidity/am2315.c
> index f29baa251f9f..5bce5eec45cc 100644
> --- a/drivers/iio/humidity/am2315.c
> +++ b/drivers/iio/humidity/am2315.c
> @@ -1,6 +1,6 @@
> // SPDX-License-Identifier: GPL-2.0-only
> /*
> - * Aosong AM2315 relative humidity and temperature
> + * Aosong AM2315/AM2320 relative humidity and temperature
> *
> * Copyright (c) 2016, Intel Corporation.
> *
> @@ -251,6 +251,7 @@ static int am2315_probe(struct i2c_client *client)
>
> static const struct i2c_device_id am2315_i2c_id[] = {
> { .name = "am2315" },
> + { .name = "am2320" },
> { }
> };
> MODULE_DEVICE_TABLE(i2c, am2315_i2c_id);
> --
> 2.47.3
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iio: humidity: am2315: add am2320 to i2c_device_id table
2026-08-06 9:46 ` Nuno Sá
@ 2026-08-06 21:34 ` Andy Shevchenko
0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2026-08-06 21:34 UTC (permalink / raw)
To: Nuno Sá
Cc: Nicolás Antinori, Jonathan Cameron, Andy Shevchenko,
Brigham Campbell, David Lechner, Jori Koolstra, Nuno Sá,
Shuah Khan, linux-iio, linux-kernel, linux-kernel-mentees
On Thu, Aug 06, 2026 at 10:46:13AM +0100, Nuno Sá wrote:
> On Wed, Aug 05, 2026 at 03:37:26PM -0300, Nicolás Antinori wrote:
...
> > config AM2315
> > - tristate "Aosong AM2315 relative humidity and temperature sensor"
> > + tristate "Aosong AM2315/AM2320 relative humidity and temperature sensor"
> > depends on I2C
> > select IIO_BUFFER
> > select IIO_TRIGGERED_BUFFER
> > help
> > If you say yes here you get support for the Aosong AM2315
> > - relative humidity and ambient temperature sensor.
> > + and AM2320 relative humidity and ambient temperature sensors.
>
> The above (same on the tristate title) does not really scale nicely and
> we've seen too often already. So I use something like "... and similar
> devices"
Right, and here something to be a list of the supported devices (in case more
will come):
If you say yes here you get support for the Aosong
relative humidity and ambient temperature sensors:
- AM2315
- AM2320
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-08-06 21:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-05 18:37 [PATCH] iio: humidity: am2315: add am2320 to i2c_device_id table Nicolás Antinori
2026-08-06 1:37 ` Marcelo Schmitt
2026-08-06 9:46 ` Nuno Sá
2026-08-06 21:34 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox