From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A45C359A6B for ; Wed, 12 Aug 2026 15:56:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786550181; cv=none; b=NrVCWhruqcstINkjkcSX0Q5WjttJTWzB1kohysKdz66v9/XYeeRS6tS/jgnVPhpK5mEXNbPeOzGHJT2Y1xqUombG7uPMFO3N6biBA7rxiS5tVDBcNC4YHwaRtgdykrlq0FOwS1agF5nZdBHjmjS5S2wLHOEy9mgFpIQkJP349Zc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786550181; c=relaxed/simple; bh=0AaMJ2ZuNPDpNygnkdWg2dPvVXYhqFjRU2NBOmUvi78=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=bgyVuFt0DAUfjKXs4oxTfWP1eVS3DyuPcuP0op4zWmcAAMufey6iNr8C0FT8Ima1qi70CtOGOV+rijPp13VEE10zQtde7C5FHVU6eDjs2aAJuWcJZNnwYYTh9Yrere8Mjvf7XHQnGe81RjV1DDKQw8O5S6zK+uxNIa6GoIoreaw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=keLJ5GAh; arc=none smtp.client-ip=209.85.210.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="keLJ5GAh" Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-84e3007a2b7so1154904b3a.0 for ; Wed, 12 Aug 2026 08:56:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786550180; x=1787154980; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:from:to:cc :subject:date:message-id:reply-to:content-type; bh=eNFhq05aNqziwdNErnHS5ilsR28OC8bIWpEV7AXBxgQ=; b=keLJ5GAh0g5RtMV11QpSx2n2/UZJt9lrLY7QD4eGNlZNn9FIeEiokdcdP6RsROEf8l U6l6eayJdsXTmELLoMMF+HpyM8DUHSZJY34KizyKdZKwASxR+VE8QPFL9lE0izyBwEqi qi/D3gC7vH2xQIX+sCK9li90foUuV90LhNHITSCO3jZ4aR1CdgYGWMatJUwhEQgWtEx8 rVHWves+vdglinrFZewIaK0qigV2+/PojneTvZUY7aTakNrv0vFm0+GuWspG7MOi+AN1 rLTb+paNyED/n4IuYwZIPHko4FVvsp4euXFO7zNFWWHO7cUU9+ViY/6Hkl2JZcPZ3aId muVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786550180; x=1787154980; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=eNFhq05aNqziwdNErnHS5ilsR28OC8bIWpEV7AXBxgQ=; b=sMhK0SvuVGPl78J1XHvlFox8sfhmV7v++6DExOyn6c1kGaL5u9ndcq3+gQ2Rwv5nLY bWEVGPCw7nba5HevhVjtkIhboWbv4vstWvF5ZzcueBUHEZMrG10YZ/S0GsJTLvZn84/N GrnPrjtKf5mi15bEIpEwF82XKov1ZrhdRKOUJG5trWqQ1fDXKewpjWrZc6hAl/xWTvfl IQ026Gbth67LvvZVt4vZJwjYBeyapdLEgY0lXVOspxTCdNKB8ZOpG3lTUUkb+BIdq20q esXCeQW1YbC/8JgTcWP8pYqK/ZBsrCtbeFk+iBVnjbGl1VgvrtTtcc9fj2oi6CsxrSvD nWPw== X-Forwarded-Encrypted: i=1; AHgh+Rq1Zfi52kv5WJIzmjcHnOPZ8DKwfPjxMsnoIIc3Bto7OYIJRm3Wl3gbaq9H/zCLMT3cV17n6/wU9BY0XNc=@vger.kernel.org X-Gm-Message-State: AOJu0YzB45U+FCrlr1RNviH34jTkA4SRj4fyRTqXlTVYf1wJ1r3I/xRy cOqlfjJoDKfn3z0HTXgBrfmUBJ1azTiH/NWagF9EGadmfc+L0Nxi2DI= X-Gm-Gg: AR+sD13M+OJqGYxkLeNnPwpkXiG4aqh4j48nR+7Nz3r7aPZhso4egDjiFPRAk6pd0aC FSAMlAWGtbGmqNGsUX6zssiTVyHTo1pxNALgVoahInDOszN7qF30nDYh2iwRTtkkk6/RYXRE/GG rLprMyV1R/qANTszlq86QfF+9l54mc0/ap1eBEJ+PgZb14xjKSbyqbtzVi7lLg71pNeISPoSu4Z QvAbJI3u65vmmn/QHjMF7FqZ8VbrOL3xK4083kdSb4FMxC3DLKyxM67azmEQThvh9Ir2Y3nySu5 HxI4Y1YL4+/k0/RlmRebWkr4kElHGU3AzIh+7tH5oA9Y6esLDV+Yhnvv8VhlITav9QkSv5plZsK 0kq4/I9E4regohEdoQJkQp94Jwfeo7VqIWDTgSBD1ji5GOnpna8H/m+OcxYImyWDYfVMdDZ47uZ Iycs714rLGOlE3bJgHVYxV+c+eUn+rMQhgT10wDKbguQcqysr1MY3ty/5K6S3GiFRFrmLg8RvZ5 ebzQOT9qgtbejC0tGGCq25C X-Received: by 2002:a05:6a00:8084:b0:84e:244a:98e8 with SMTP id d2e1a72fcca58-84fb55490b2mr6851084b3a.30.1786550179686; Wed, 12 Aug 2026 08:56:19 -0700 (PDT) Received: from localhost ([186.158.238.108]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-84fb1f73159sm1220212b3a.56.2026.08.12.08.56.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Aug 2026 08:56:19 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 12 Aug 2026 12:56:15 -0300 Message-Id: Cc: "Andy Shevchenko" , "Marcelo Schmitt" , "Andy Shevchenko" , "Brigham Campbell" , "Jori Koolstra" , =?utf-8?q?Nuno_S=C3=A1?= , "Shuah Khan" , , , Subject: Re: [PATCH v2] iio: humidity: am2315: add am2320 to i2c_device_id table From: =?utf-8?q?Nicol=C3=A1s_Antinori?= To: "Jonathan Cameron" , "David Lechner" X-Mailer: aerc 0.20.0 References: <20260810183337.451812-1-nico.antinori.7@gmail.com> <2d7dcced-47f9-4fcf-9668-30acb9e8c9b1@baylibre.com> <125ac6a1-a089-4ce8-9b20-c3448b6b5208@baylibre.com> <20260812054339.6f58b5fd@jic23-huawei> 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 wrote: > >> On 8/11/26 12:58 PM, Nicol=C3=A1s Antinori wrote: >> > On Tue Aug 11, 2026 at 12:49 PM -03, David Lechner wrote: =20 >> >> On 8/11/26 10:12 AM, Nicol=C3=A1s Antinori wrote: =20 >> >>> On Mon Aug 10, 2026 at 4:28 PM -03, David Lechner wrote: =20 >> >>>> On 8/10/26 1:32 PM, Nicol=C3=A1s Antinori wrote: =20 >> >>>>> 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. =20 >> >>>> >> >>>> Interesting. No devicetree bindings for this one? What kind of >> >>>> system is it on? >> >>>> =20 >> >>> >> >>> I am testing this on a Raspberry Pi 3b mounted on a protoboard. =20 >> >> >> >> 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. =20 >> >=20 >> > I do it manually. >> >=20 >> > I use that RPi for development, at the moment the kernel I am using is= =20 >> > 7.2.0-rc6-v8+ with CONFIG_AM2315=3Dm. When I need to use the AM2320 I >> > modprobe it with: >> >=20 >> > $ sudo modprobe am2315 >> >=20 >> > And then=20 >> >=20 >> > $ sudo bash -c "echo am2315 0x5c > /sys/bus/i2c/devices/i2c-1/new_devi= ce" >> >=20 >> > (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). >> >=20 >> > If a dt-binding yaml is needed I can send another patch with it! >> >=20 >> > =20 >>=20 >> 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.y= aml > 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 > >>=20 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.