diff mbox series

[RFC,v3,6/7] i2c: aspeed: Set the fwnode for the adap->dev

Message ID 20230531100600.13543-7-Jonathan.Cameron@huawei.com (mailing list archive)
State RFC, archived
Headers show
Series i2c: Enabling use of aspeed-i2c with ACPI | expand

Commit Message

Jonathan Cameron May 31, 2023, 10:05 a.m. UTC
This is needed for the bus matching used for ACPI based
i2c client registration.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/i2c/busses/i2c-aspeed.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Andy Shevchenko May 31, 2023, 5:46 p.m. UTC | #1
On Wed, May 31, 2023 at 1:09 PM Jonathan Cameron
<Jonathan.Cameron@huawei.com> wrote:
>
> This is needed for the bus matching used for ACPI based
> i2c client registration.

Btw, this patch like maybe others (e.g., patch 1) can be sent already
as non-RFC and applied independently on the goal of the entire series.
Jonathan Cameron June 1, 2023, 9:10 a.m. UTC | #2
On Wed, 31 May 2023 20:46:42 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Wed, May 31, 2023 at 1:09 PM Jonathan Cameron
> <Jonathan.Cameron@huawei.com> wrote:
> >
> > This is needed for the bus matching used for ACPI based
> > i2c client registration.  
> 
> Btw, this patch like maybe others (e.g., patch 1) can be sent already
> as non-RFC and applied independently on the goal of the entire series.
> 

True but then I have to reference two sets of precursors for
what I care about for now.  Now this is fairly stable, I'll circle
back to post these as a separate set - I can carry on referencing the
RFC from the QEMU side of things (and blog post etc I should write on this...)

Jonathan
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
index 992d64acd38d..e262b06e224b 100644
--- a/drivers/i2c/busses/i2c-aspeed.c
+++ b/drivers/i2c/busses/i2c-aspeed.c
@@ -1018,7 +1018,6 @@  static int aspeed_i2c_probe_bus(struct platform_device *pdev)
 	bus->adap.retries = 0;
 	bus->adap.algo = &aspeed_i2c_algo;
 	bus->adap.dev.parent = &pdev->dev;
-	bus->adap.dev.of_node = pdev->dev.of_node;
 	strscpy(bus->adap.name, pdev->name, sizeof(bus->adap.name));
 	i2c_set_adapdata(&bus->adap, bus);
 
@@ -1044,6 +1043,8 @@  static int aspeed_i2c_probe_bus(struct platform_device *pdev)
 	if (ret < 0)
 		return ret;
 
+	device_set_node(&bus->adap.dev, dev_fwnode(&pdev->dev));
+
 	ret = i2c_add_adapter(&bus->adap);
 	if (ret < 0)
 		return ret;