diff mbox series

i2c: synquacer: fix enumeration of slave devices

Message ID 20190430094734.21414-1-ard.biesheuvel@linaro.org
State Accepted
Commit 95e0cf3caeb11e1b0398c747b5cfa12828263824
Headers show
Series i2c: synquacer: fix enumeration of slave devices | expand

Commit Message

Ard Biesheuvel April 30, 2019, 9:47 a.m. UTC
The I2C host driver for SynQuacer fails to populate the of_node and
ACPI companion fields of the struct i2c_adapter it instantiates,
resulting in enumeration of the subordinate I2C bus to fail.

Fixes: 0d676a6c4390 ("i2c: add support for Socionext SynQuacer I2C controller")
Cc: <stable@vger.kernel.org> # v4.19+
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 drivers/i2c/busses/i2c-synquacer.c | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.20.1

Comments

Wolfram Sang May 2, 2019, 4:39 p.m. UTC | #1
On Tue, Apr 30, 2019 at 11:47:34AM +0200, Ard Biesheuvel wrote:
> The I2C host driver for SynQuacer fails to populate the of_node and

> ACPI companion fields of the struct i2c_adapter it instantiates,

> resulting in enumeration of the subordinate I2C bus to fail.

> 

> Fixes: 0d676a6c4390 ("i2c: add support for Socionext SynQuacer I2C controller")

> Cc: <stable@vger.kernel.org> # v4.19+

> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>


Applied to for-current-next, thanks!
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-synquacer.c b/drivers/i2c/busses/i2c-synquacer.c
index d18b0941b71a..f14d4b3fab44 100644
--- a/drivers/i2c/busses/i2c-synquacer.c
+++ b/drivers/i2c/busses/i2c-synquacer.c
@@ -597,6 +597,8 @@  static int synquacer_i2c_probe(struct platform_device *pdev)
 	i2c->adapter = synquacer_i2c_ops;
 	i2c_set_adapdata(&i2c->adapter, i2c);
 	i2c->adapter.dev.parent = &pdev->dev;
+	i2c->adapter.dev.of_node = pdev->dev.of_node;
+	ACPI_COMPANION_SET(&i2c->adapter.dev, ACPI_COMPANION(&pdev->dev));
 	i2c->adapter.nr = pdev->id;
 	init_completion(&i2c->completion);