Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit f8e2a04

Browse files
jwrdegoedegregkh
authored andcommitted
i2c: i801: Use a different adapter-name for IDF adapters
[ Upstream commit 43457ad ] 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 <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Acked-by: Wolfram Sang <[email protected]> Signed-off-by: Andi Shyti <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 2488685 commit f8e2a04

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
@@ -1754,8 +1754,15 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
17541754

17551755
i801_add_tco(priv);
17561756

1757+
/*
1758+
* adapter.name is used by platform code to find the main I801 adapter
1759+
* to instantiante i2c_clients, do not change.
1760+
*/
17571761
snprintf(priv->adapter.name, sizeof(priv->adapter.name),
1758-
"SMBus I801 adapter at %04lx", priv->smba);
1762+
"SMBus %s adapter at %04lx",
1763+
(priv->features & FEATURE_IDF) ? "I801 IDF" : "I801",
1764+
priv->smba);
1765+
17591766
err = i2c_add_adapter(&priv->adapter);
17601767
if (err) {
17611768
platform_device_unregister(priv->tco_pdev);

0 commit comments

Comments
 (0)