From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) (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 8095B2F7EE8 for ; Tue, 11 Aug 2026 15:13:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786461184; cv=none; b=bmI/z+g5gUleNpn6qXTo3D9rIEf8tATHwdBi/z/GqHM029TE08RZ+z2wYpjDBsQk5kNeO4OKCPhxMCgZmof4Wju50OcTa7IoLKnRKNq7M6I/HhNpxGX7ZDuiP00dSVJQ7xsQOrZB4Xr/8CVL8IiT23tGm1EwAKoGGBAtj0NRkiQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786461184; c=relaxed/simple; bh=GkzUhdnNmQsXCZJCgGYEHBXYyG45OukfnNSxt4u7xJA=; h=Mime-Version:Content-Type:Date:Message-Id:To:Cc:Subject:From: References:In-Reply-To; b=cgzVSs7NCiPWOzjrOespdHfO7K1wonEkLY1HHsaUm++zWDlFjKzIe0PXArxHaBPMjrfjSOJIk4hk5nBmTAxk7j0UczVZQHYThtUbouJivtCjn8j6/bg1Vyv0hxvyjg4pj0D9p2nJGQ777kaQhhR4/cUvaRiDZHYHBve1ncIcaB4= 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=PMhHEYzA; arc=none smtp.client-ip=209.85.128.173 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="PMhHEYzA" Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-80cebd41372so44853267b3.3 for ; Tue, 11 Aug 2026 08:13:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786461182; x=1787065982; darn=vger.kernel.org; h=in-reply-to:references:from:subject:cc:to:message-id:date :content-type:content-transfer-encoding:mime-version:from:to:cc :subject:date:message-id:reply-to:content-type; bh=EwSYPQauRfRG53p3PkwAK6rBy9dBSDSqpFZZZt55ve0=; b=PMhHEYzA5EF8OeIIJZ+doyB0w/WEil7YICyuqBAYAyT741tMVB9SBL2NajRUqVExE0 WhOEtfhR7loY1EvHElUoqw3EHPbJMevRAqdSr9FdCIx7a5/yMxJ4KUeOVKBGWAr4mFCS oi0acG2ahUgOK/q6WFrXLLbcOCdpAO++AQ+HouAoPOC9DMuw9SlzY3UA3gz7/dqQou3k eysVFVJTBXVHg0b8eJJ4d+k5uknUJ0C9zqvoRRfRFI7DtZBtFdTAXN0D2VC7+V32faZx nmqPZfjkP6SBjDgvqkIvNB8viPxwWI5Yvy5GzoPJbzZDsT+ZbkzFwbwZtEDzuD8U1hBU k4jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786461182; x=1787065982; h=in-reply-to:references:from:subject:cc:to: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=EwSYPQauRfRG53p3PkwAK6rBy9dBSDSqpFZZZt55ve0=; b=cjPtyAmT5ezp5X31C7h1zoNZO98ftI8d9myX1yzot/6XpMkm3D2iPE1uZW/AB3TI95 0CVLm430DN6zUyxTTkNOMaoQX47cjPdf/vW4L6Ais8WgLxWNhFsgY9OtMGRjrwrRanpO ybB7kMFMt0+BHJLPMnCVOnKBiftQXJ33H0lDTx+qwL57ugYiumTNQ85Sy84dPhBF5k6B T0stpjSG4SZiGwrXnbx0knD97lwSkhmjMo8yIiDmJUHVm9X3AE4TJLju/tBtcF+RZISN aI7qeqKGC6pEm44s4NSeNwgCV8SrApPX2VJG/cj2qzgntaznfnFs3Ui2oEUm+4AhVE+i N3uw== X-Forwarded-Encrypted: i=1; AHgh+RpqBxYkcg4WNEhICbUEISMibsa81pV0YItjLo/wc2zBQtxQBkmBrEyH4GFiaj7oLfTcrN2wiR5KkB7KHqk=@vger.kernel.org X-Gm-Message-State: AOJu0YygiXFhijNy08IZHB1Y2vNBKgAag0x70fQEDeOqOyr6VFa/zex4 2pnjcXQuaolQGy+dMTHuX8IFYrAkmSgrBxgf6q/pIp5av3O+21Q0DQZhmJ0DScs= X-Gm-Gg: AR+sD12zcKDuHc2FQBSBS7fkD9q8xO0OCZTzrbGwiA+daxLatIj5jLVTBrmROTkb1LY b/ob7pwEJUSoyDMsdETPxZyU/grdt7cIIJUqr2i/v5gVnlnaoflH9vO+YEmwrXXp+Xfhk0zj1PG 5QRPt9yVZElqDFNyX7qCg+0B49tru97J9v/aa/dDHmKXZRg1TzaeXhfLdRCEacNcExb/SnLWkDk 9q1bfIxSEIsRq9LEFktQB+5BRUv4CnMhiIdf2ihNyn5VlZ8CvwFQysZ8wnDExihfBsoqMoQ4Gbb SvcGYeEhZiit1yvsYpWr33ureXYYVtAfI1Vwoj+xiCgxJvW/e1lLpAzFm3K2fLf1KauDhCdGqyE C8JCW/n5RzCMOKUiRDueBElHXL02OpVaB2xkCRJY0Kg5cDUdn5/s9JOae8vDmPNzeQoP80HZ5t4 KhrB5WoXfqmv5WXEpBBzInl28lGgSKKEPgOYYeGC6+F2Gm3spPWp3rIICnFjfBYOc1EKE/zZgoD oSCFe+kDfYGhGNo/5SniPBs X-Received: by 2002:a05:690c:7308:b0:80e:38c5:bc17 with SMTP id 00721157ae682-82f289dd624mr31186957b3.7.1786461182335; Tue, 11 Aug 2026 08:13:02 -0700 (PDT) Received: from localhost ([186.158.238.108]) by smtp.gmail.com with ESMTPSA id 00721157ae682-82ebcee0647sm11118477b3.2.2026.08.11.08.12.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Aug 2026 08:13:01 -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: Tue, 11 Aug 2026 12:12:57 -0300 Message-Id: To: "Andy Shevchenko" , "Marcelo Schmitt" Cc: "Jonathan Cameron" , "Andy Shevchenko" , "Brigham Campbell" , "David Lechner" , "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?= X-Mailer: aerc 0.20.0 References: <20260810183337.451812-1-nico.antinori.7@gmail.com> In-Reply-To: On Mon Aug 10, 2026 at 4:28 PM -03, David Lechner wrote: > On 8/10/26 1:32 PM, Nicol=C3=A1s 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. On Tue Aug 11, 2026 at 4:38 AM -03, Andy Shevchenko wrote: > On Mon, Aug 10, 2026 at 11:36:48PM -0300, Marcelo Schmitt wrote: >> On 08/10, Nicol=C3=A1s 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. >>=20 >> An alternative might be to use the device id. >>=20 >> const struct i2c_device_id *id =3D i2c_client_get_device_id(client); >> ... >>=20 >> indio_dev->name =3D id->name; >>=20 >> Not sure if the second option works well for both i2c and dt (probably n= ot), 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 pr= ovided > via string literals independently on the ID tables (as there maybe same I= D in > the tables for the slightly different devices that may be autodetected ru= ntime, > or different IDs for the same or fully compatible component; the chip_inf= o works > for the latter case). Thank you all for the suggestions. I am going to try to implement=20 chip_info struct. I'll wait a little bit to send the v3 in case there are some more comments on this version. Regards, Nicol=C3=A1s=20