diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2019-04-30 12:47:34 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2019-05-02 19:38:53 +0300 |
commit | 95e0cf3caeb11e1b0398c747b5cfa12828263824 (patch) | |
tree | bbdc0f4841edcf2dca46ec79d428516d9bd6295c /drivers/i2c/busses/i2c-synquacer.c | |
parent | fb31fbef9c35fbc4fc15cbf8bfafa96e5638d8d5 (diff) | |
download | linux-95e0cf3caeb11e1b0398c747b5cfa12828263824.tar.xz |
i2c: synquacer: fix enumeration of slave devices
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>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-synquacer.c')
-rw-r--r-- | drivers/i2c/busses/i2c-synquacer.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |