diff options
author | 2020-05-19 15:50:42 +0300 | |
---|---|---|
committer | 2020-05-22 16:50:39 +0200 | |
commit | 64d0a0755c7deeb600d8ee287cfb84469aa37ac8 (patch) | |
tree | fefce284d85a69caed60459fe62b646ed0c6a638 /drivers/i2c | |
parent | i2c: designware: Move ACPI parts into common module (diff) | |
download | linux-64d0a0755c7deeb600d8ee287cfb84469aa37ac8.tar.gz linux-64d0a0755c7deeb600d8ee287cfb84469aa37ac8.tar.bz2 linux-64d0a0755c7deeb600d8ee287cfb84469aa37ac8.zip |
i2c: designware: Read counters from ACPI for PCI driver
PCI devices may have been backed with ACPI handle which supplies
an additional information to the drivers, such as counters.
Call for ACPI configuration from PCI driver in order to utilize counters
provided by ACPI.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-designware-pcidrv.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index c8808e5855b4..3664d76bb976 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c @@ -255,6 +255,17 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev, } } + i2c_dw_acpi_adjust_bus_speed(&pdev->dev); + + if (has_acpi_companion(&pdev->dev)) + i2c_dw_acpi_configure(&pdev->dev); + + r = i2c_dw_validate_speed(dev); + if (r) { + pci_free_irq_vectors(pdev); + return r; + } + i2c_dw_configure(dev); if (controller->scl_sda_cfg) { |