From: Chris Pringle <chris.pringle@phabrix.com>
To: wsa@kernel.org, Michael.Brunner@kontron.com, ingmar.klein@kontron.com
Cc: chris.pringle@phabrix.com, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] i2c: kempld: Support ACPI I2C device declaration
Date: Thu, 11 Aug 2022 09:21:41 +0100 [thread overview]
Message-ID: <20220811082141.1428977-1-chris.pringle@phabrix.com> (raw)
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
next reply other threads:[~2022-08-11 8:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-11 8:21 Chris Pringle [this message]
2022-08-11 20:51 ` [PATCH] i2c: kempld: Support ACPI I2C device declaration Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220811082141.1428977-1-chris.pringle@phabrix.com \
--to=chris.pringle@phabrix.com \
--cc=Michael.Brunner@kontron.com \
--cc=ingmar.klein@kontron.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wsa@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox