2022-05-11 21:42:23

by Piyush Malgujar

[permalink] [raw]
Subject: [PATCH 3/3] drivers: i2c: thunderx: Allow driver to work with ACPI defined TWSI controllers

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

Signed-off-by: Szymon Balcerak <[email protected]>
Signed-off-by: Piyush Malgujar <[email protected]>
---
drivers/i2c/busses/i2c-thunderx-pcidrv.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/busses/i2c-thunderx-pcidrv.c b/drivers/i2c/busses/i2c-thunderx-pcidrv.c
index 5621e983406b0bebf9c5c9e30921e45f3f15909b..3dd5a4d798f99e9b5282360cf9d5840042fc8dcc 100644
--- a/drivers/i2c/busses/i2c-thunderx-pcidrv.c
+++ b/drivers/i2c/busses/i2c-thunderx-pcidrv.c
@@ -220,6 +220,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);
--
2.17.1



2022-05-23 07:19:13

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH 3/3] drivers: i2c: thunderx: Allow driver to work with ACPI defined TWSI controllers

On Wed, May 11, 2022 at 06:36:59AM -0700, Piyush Malgujar wrote:
> Due to i2c->adap.dev.fwnode not being set, ACPI_COMPANION() wasn't properly
> found for TWSI controllers.
>
> Signed-off-by: Szymon Balcerak <[email protected]>
> Signed-off-by: Piyush Malgujar <[email protected]>

Applied to for-current, thanks!


Attachments:
(No filename) (333.00 B)
signature.asc (849.00 B)
Download all attachments