]> git.itanic.dy.fi Git - linux-stable/commitdiff
drivers: i2c: thunderx: Allow driver to work with ACPI defined TWSI controllers
authorPiyush Malgujar <pmalgujar@marvell.com>
Wed, 11 May 2022 13:36:59 +0000 (06:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Jun 2022 06:20:56 +0000 (08:20 +0200)
[ Upstream commit 03a35bc856ddc09f2cc1f4701adecfbf3b464cb3 ]

Due to i2c->adap.dev.fwnode not being set, ACPI_COMPANION() wasn't properly
found for TWSI controllers.

Signed-off-by: Szymon Balcerak <sbalcerak@marvell.com>
Signed-off-by: Piyush Malgujar <pmalgujar@marvell.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-thunderx-pcidrv.c

index df0976f4432a152d6ff613dc57239de81919afde..4f0456fe86914fdd792ee1d4c4aa60daa7ffa16e 100644 (file)
@@ -215,6 +215,7 @@ static int thunder_i2c_probe_pci(struct pci_dev *pdev,
        i2c->adap.bus_recovery_info = &octeon_i2c_recovery_info;
        i2c->adap.dev.parent = dev;
        i2c->adap.dev.of_node = pdev->dev.of_node;
+       i2c->adap.dev.fwnode = dev->fwnode;
        snprintf(i2c->adap.name, sizeof(i2c->adap.name),
                 "Cavium ThunderX i2c adapter at %s", dev_name(dev));
        i2c_set_adapdata(&i2c->adap, i2c);