diff mbox

i2c: xlp9xx: ACPI support for I2C clients

Message ID 1473967659-9000-1-git-send-email-tanmay.jagdale@broadcom.com
State Accepted
Headers show

Commit Message

Tanmay Jagdale Sept. 15, 2016, 7:27 p.m. UTC
The ACPI companion of the adapter has to be set for I2C controller
code to read and attach the slave devices described in the ACPI table
with the I2CSerialBus resource descriptor. Used ACPI_COMPANION_SET
macro to set this.

Signed-off-by: Tanmay Jagdale <tanmay.jagdale@broadcom.com>
---
 drivers/i2c/busses/i2c-xlp9xx.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Wolfram Sang Sept. 21, 2016, 9:17 p.m. UTC | #1
> +	ACPI_COMPANION_SET(&(priv->adapter.dev), ACPI_COMPANION(&pdev->dev));

No need for parenthesis in the first argument.
Wolfram Sang Nov. 18, 2016, 1:27 a.m. UTC | #2
On Fri, Sep 16, 2016 at 12:57:39AM +0530, Tanmay Jagdale wrote:
> The ACPI companion of the adapter has to be set for I2C controller
> code to read and attach the slave devices described in the ACPI table
> with the I2CSerialBus resource descriptor. Used ACPI_COMPANION_SET
> macro to set this.
> 
> Signed-off-by: Tanmay Jagdale <tanmay.jagdale@broadcom.com>

Applied to for-next, but please fix review comments yourself next time.
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-xlp9xx.c b/drivers/i2c/busses/i2c-xlp9xx.c
index 55a7bef..916f192 100644
--- a/drivers/i2c/busses/i2c-xlp9xx.c
+++ b/drivers/i2c/busses/i2c-xlp9xx.c
@@ -393,6 +393,7 @@  static int xlp9xx_i2c_probe(struct platform_device *pdev)
 	init_completion(&priv->msg_complete);
 	priv->adapter.dev.parent = &pdev->dev;
 	priv->adapter.algo = &xlp9xx_i2c_algo;
+	ACPI_COMPANION_SET(&(priv->adapter.dev), ACPI_COMPANION(&pdev->dev));
 	priv->adapter.dev.of_node = pdev->dev.of_node;
 	priv->dev = &pdev->dev;