Skip to content

Commit bb7a3fc

Browse files
committed
Merge tag 'i2c-for-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c updates from Wolfram Sang: - core: cleaner fwnode usage - tegra: timing improvements and Tegra264 support - lpi2c: fix SMBus block read NACK after byte count - amd-mp2, designware, mlxbf, rtl9300, spacemit, tegra: cleanups - designware: - use a dedicated algorithm for AMD Navi - replace magic numbers with named constants - replace min_t() with min() to avoid u8 truncation - 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 - at24 i2c eeprom: - add a set of new compatibles to DT bindings - use dev_err_probe() consistently in the driver * tag 'i2c-for-7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (46 commits) i2c: imx-lpi2c: fix SMBus block read NACK after byte count i2c: designware: Remove an unnecessary condition i2c: designware: Enable mode swapping i2c: designware: Combine the init functions i2c: designware: Combine some of the common functions i2c: designware: Use device_is_compatible() instead of custom approach dt-bindings: eeprom: at24: Add compatible for Puya P24C128F drivers/i2c/busses: use min() instead of min_t() i2c: imx-lpi2c: Add runtime PM support for IRQ and clock management on i.MX8QXP/8QM i2c: amd-mp2: clean up amd_mp2_find_device() i2c: designware: Replace magic numbers with named constants i2c: rtl9300: use of instead of fwnode i2c: rtl9300: remove const cast i2c: tegra: remove unused rst i2c: designware: Remove not-going-to-be-supported code for Baikal SoC i2c: spacemit: drop useless spaces i2c: mlxbf: Use HZ_PER_KHZ in the driver i2c: mlxbf: Remove unused bus speed definitions i2c: core: Use dev_fwnode() i2c: core: Replace custom implementation of device_match_fwnode() ...
2 parents 348e77b + efdc383 commit bb7a3fc

26 files changed

Lines changed: 781 additions & 540 deletions

Documentation/devicetree/bindings/eeprom/at24.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ properties:
116116
- const: atmel,24c02
117117
- items:
118118
- enum:
119+
- belling,bl24c04a
119120
- giantec,gt24c04a
120121
- onnn,cat24c04
121122
- onnn,cat24c05
@@ -124,6 +125,7 @@ properties:
124125
- items:
125126
- enum:
126127
- belling,bl24c16a
128+
- belling,bl24c16f
127129
- renesas,r1ex24016
128130
- const: atmel,24c16
129131
- items:
@@ -132,13 +134,15 @@ properties:
132134
- items:
133135
- enum:
134136
- belling,bl24s64
137+
- giantec,gt24p64a
135138
- onnn,n24s64b
136139
- puya,p24c64f
137140
- const: atmel,24c64
138141
- items:
139142
- enum:
140143
- giantec,gt24p128e
141144
- giantec,gt24p128f
145+
- puya,p24c128f
142146
- renesas,r1ex24128
143147
- samsung,s524ad0xd1
144148
- const: atmel,24c128

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/i2c-mt65xx.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ properties:
5454
- enum:
5555
- mediatek,mt6878-i2c
5656
- mediatek,mt6991-i2c
57+
- mediatek,mt8189-i2c
5758
- mediatek,mt8196-i2c
5859
- const: mediatek,mt8188-i2c
5960
- items:

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)