Re: [PATCH v2] iio: humidity: am2315: add am2320 to i2c_device_id table
David Lechner <[email protected]>
| Newsgroups | dev.linux.lists.linux-kernel-mentees,org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
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.