Skip to content

Commit 42427e1

Browse files
committed
i2c: i801: Use a different adapter-name for IDF adapters
JIRA: https://issues.redhat.com/browse/RHEL-47426 commit 43457ad Author: Hans de Goede <hdegoede@redhat.com> Date: Mon Aug 12 22:39:48 2024 +0200 i2c: i801: Use a different adapter-name for IDF adapters On chipsets with a second 'Integrated Device Function' SMBus controller use a different adapter-name for the second IDF adapter. This allows platform glue code which is looking for the primary i801 adapter to manually instantiate i2c_clients on to differentiate between the 2. This allows such code to find the primary i801 adapter by name, without needing to duplicate the PCI-ids to feature-flags mapping from i2c-i801.c. Reviewed-by: Pali Rohár <pali@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: David Arcari <darcari@redhat.com>
1 parent 2b17ec4 commit 42427e1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

drivers/i2c/busses/i2c-i801.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1764,8 +1764,15 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
17641764

17651765
i801_add_tco(priv);
17661766

1767+
/*
1768+
* adapter.name is used by platform code to find the main I801 adapter
1769+
* to instantiante i2c_clients, do not change.
1770+
*/
17671771
snprintf(priv->adapter.name, sizeof(priv->adapter.name),
1768-
"SMBus I801 adapter at %04lx", priv->smba);
1772+
"SMBus %s adapter at %04lx",
1773+
(priv->features & FEATURE_IDF) ? "I801 IDF" : "I801",
1774+
priv->smba);
1775+
17691776
err = i2c_add_adapter(&priv->adapter);
17701777
if (err) {
17711778
platform_device_unregister(priv->tco_pdev);

0 commit comments

Comments
 (0)