All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: kempld: Support ACPI I2C device declaration
@ 2022-08-11  8:21 Chris Pringle
  2022-08-11 20:51 ` Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Pringle @ 2022-08-11  8:21 UTC (permalink / raw
  To: wsa, Michael.Brunner, ingmar.klein; +Cc: chris.pringle, linux-i2c, linux-kernel

Adds an ACPI companion to the KEMPLD I2C driver so that it correctly
detects any I2C devices nested under the KEMPLD's ACPI node (SBRG.CPLD).

This allows I2C devices attached to the KEMPLD I2C adapter to be declared
and instantiated via ACPI.

Signed-off-by: Chris Pringle <chris.pringle@phabrix.com>
---
 drivers/i2c/busses/i2c-kempld.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/busses/i2c-kempld.c b/drivers/i2c/busses/i2c-kempld.c
index 5bbb7f0d7852..cf857cf22507 100644
--- a/drivers/i2c/busses/i2c-kempld.c
+++ b/drivers/i2c/busses/i2c-kempld.c
@@ -303,6 +303,7 @@ static int kempld_i2c_probe(struct platform_device *pdev)
 	i2c->dev = &pdev->dev;
 	i2c->adap = kempld_i2c_adapter;
 	i2c->adap.dev.parent = i2c->dev;
+	ACPI_COMPANION_SET(&i2c->adap.dev, ACPI_COMPANION(&pdev->dev));
 	i2c_set_adapdata(&i2c->adap, i2c);
 	platform_set_drvdata(pdev, i2c);
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] i2c: kempld: Support ACPI I2C device declaration
  2022-08-11  8:21 [PATCH] i2c: kempld: Support ACPI I2C device declaration Chris Pringle
@ 2022-08-11 20:51 ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2022-08-11 20:51 UTC (permalink / raw
  To: Chris Pringle; +Cc: Michael.Brunner, ingmar.klein, linux-i2c, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

On Thu, Aug 11, 2022 at 09:21:41AM +0100, Chris Pringle wrote:
> Adds an ACPI companion to the KEMPLD I2C driver so that it correctly
> detects any I2C devices nested under the KEMPLD's ACPI node (SBRG.CPLD).
> 
> This allows I2C devices attached to the KEMPLD I2C adapter to be declared
> and instantiated via ACPI.
> 
> Signed-off-by: Chris Pringle <chris.pringle@phabrix.com>

Applied to for-current, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-11 20:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-11  8:21 [PATCH] i2c: kempld: Support ACPI I2C device declaration Chris Pringle
2022-08-11 20:51 ` Wolfram Sang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.