Skip to content

Commit 8ed5a41

Browse files
author
Wolfram Sang
committed
Merge tag 'i2c-host-6.20' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-mergewindow
i2c-host for v6.20 - amd-mp2, designware, mlxbf, rtl9300, spacemit, tegra: cleanups - designware: use a dedicated algorithm for AMD Navi - designware: replace magic numbers with named constants - designware: replace min_t() with min() to avoid u8 truncation - designware: refactor core to enable mode switching - imx-lpi2c: add runtime PM support for IRQ and clock handling - lan9691-i2c: add new driver - rtl9300: use OF helpers directly and avoid fwnode handling - spacemit: add bus reset support - units: add HZ_PER_GHZ and use it in several i2c drivers
2 parents 756b7b8 + 51e8ce3 commit 8ed5a41

22 files changed

Lines changed: 423 additions & 452 deletions

Documentation/devicetree/bindings/i2c/atmel,at91sam-i2c.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ properties:
2626
- microchip,sam9x60-i2c
2727
- items:
2828
- enum:
29+
- microchip,lan9691-i2c
2930
- microchip,sama7d65-i2c
3031
- microchip,sama7g5-i2c
3132
- microchip,sam9x7-i2c

Documentation/devicetree/bindings/i2c/spacemit,k1-i2c.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ properties:
4141
default: 400000
4242
maximum: 3300000
4343

44+
resets:
45+
maxItems: 1
46+
4447
required:
4548
- compatible
4649
- reg

drivers/i2c/busses/Kconfig

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -569,24 +569,17 @@ config I2C_DESIGNWARE_CORE
569569
help
570570
This option enables support for the Synopsys DesignWare I2C adapter.
571571
This driver includes support for the I2C host on the Synopsys
572-
Designware I2C adapter.
572+
Designware I2C adapter, and the I2C slave when enabled (select
573+
I2C_SLAVE).
573574

574575
To compile the driver as a module, choose M here: the module will be
575576
called i2c-designware-core.
576577

577578
if I2C_DESIGNWARE_CORE
578579

579-
config I2C_DESIGNWARE_SLAVE
580-
bool "Synopsys DesignWare Slave"
581-
select I2C_SLAVE
582-
help
583-
If you say yes to this option, support will be included for the
584-
Synopsys DesignWare I2C slave adapter.
585-
586580
config I2C_DESIGNWARE_PLATFORM
587581
tristate "Synopsys DesignWare Platform driver"
588582
depends on (ACPI && COMMON_CLK) || !ACPI
589-
select MFD_SYSCON if MIPS_BAIKAL_T1
590583
default I2C_DESIGNWARE_CORE
591584
help
592585
If you say yes to this option, support will be included for the

drivers/i2c/busses/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ obj-$(CONFIG_I2C_DAVINCI) += i2c-davinci.o
5353
obj-$(CONFIG_I2C_DESIGNWARE_CORE) += i2c-designware-core.o
5454
i2c-designware-core-y := i2c-designware-common.o
5555
i2c-designware-core-y += i2c-designware-master.o
56-
i2c-designware-core-$(CONFIG_I2C_DESIGNWARE_SLAVE) += i2c-designware-slave.o
56+
i2c-designware-core-$(CONFIG_I2C_SLAVE) += i2c-designware-slave.o
5757
obj-$(CONFIG_I2C_DESIGNWARE_PLATFORM) += i2c-designware-platform.o
5858
i2c-designware-platform-y := i2c-designware-platdrv.o
5959
i2c-designware-platform-$(CONFIG_I2C_DESIGNWARE_AMDPSP) += i2c-designware-amdpsp.o

drivers/i2c/busses/i2c-amd-mp2-pci.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,18 +456,20 @@ module_pci_driver(amd_mp2_pci_driver);
456456

457457
struct amd_mp2_dev *amd_mp2_find_device(void)
458458
{
459+
struct amd_mp2_dev *privdata;
459460
struct device *dev;
460461
struct pci_dev *pci_dev;
461-
struct amd_mp2_dev *mp2_dev;
462462

463463
dev = driver_find_next_device(&amd_mp2_pci_driver.driver, NULL);
464464
if (!dev)
465465
return NULL;
466466

467467
pci_dev = to_pci_dev(dev);
468-
mp2_dev = (struct amd_mp2_dev *)pci_get_drvdata(pci_dev);
468+
privdata = pci_get_drvdata(pci_dev);
469+
469470
put_device(dev);
470-
return mp2_dev;
471+
472+
return privdata;
471473
}
472474
EXPORT_SYMBOL_GPL(amd_mp2_find_device);
473475

drivers/i2c/busses/i2c-designware-amdisp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ static int amd_isp_dw_i2c_plat_runtime_resume(struct device *dev)
163163

164164
if (!i_dev->shared_with_punit)
165165
i2c_dw_prepare_clk(i_dev, true);
166-
if (i_dev->init)
167-
i_dev->init(i_dev);
166+
167+
i2c_dw_init(i_dev);
168168

169169
return 0;
170170
}

0 commit comments

Comments
 (0)