Re: [PATCH v2 1/5] iio: light: stk3310: lower-case the i2c device ID names

Andy Shevchenko <[email protected]>
Newsgroups org.kernel.vger.linux-iio,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-hardening,org.kernel.vger.linux-kernel
Organization Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo
Message-ID <[email protected]>
On Wed, Aug 26, 2026 at 07:54:05PM +0200, Jorijn van der Graaf wrote:
> The i2c device IDs were introduced in capitals, mirroring the ACPI
> _HID entries added by the same commit be9e6229d676 ("iio: light: Add
> support for Sensortek STK3310"); at that point the driver enumerated
> through ACPI only, with no OF table and no i2c module alias export.
> ACPI _HIDs have their own naming rules; i2c device names
> conventionally use the lower-case part name, matching the devicetree
> compatible suffix.
> 
> The spelling is visible: a client instantiated through the i2c sysfs
> interface under the lower-case name taken from a compatible string
> binds through the OF table's name fallback, but has no firmware node,
> so i2c_match_id() is the only way for it to reach driver match data,
> and its string comparison is case-sensitive, so the capitals can never
> match. Lower-case the names so such clients match the id table, and
> receive the per-chip match data a subsequent change attaches to it.
> 
> The module aliases follow the rename (i2c:STK3310 becomes
> i2c:stk3310), and a sysfs client instantiated under a capitals name no
> longer binds.

Reviewed-by: Andy Shevchenko <[email protected]>
with all responsibility for the theoretically possible breakages
of the weird setups. But I strongly believe that no one is using
capital letters for I²C instantiation of this driver as it was
submitted for ACPI use and followed by DT support.

-- 
With Best Regards,
Andy Shevchenko
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.