Skip to content

Commit 022ce88

Browse files
committed
Merge tag 'i2c-for-6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang: "Biggest news is that Andi Shyti steps in for maintaining the controller drivers. Thank you very much! Other than that, one new driver maintainer and the rest is usual driver bugfixes. at24 has a Kconfig dependecy fix" * tag 'i2c-for-6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: MAINTAINERS: Add entries for Renesas RZ/V2M I2C driver eeprom: at24: also select REGMAP i2c: sprd: Delete i2c adapter in .remove's error path i2c: mv64xxx: Fix reading invalid status value in atomic mode i2c: designware: fix idx_write_cnt in read loop i2c: mchp-pci1xxxx: Avoid cast to incompatible function type i2c: img-scb: Fix spelling mistake "innacurate" -> "inaccurate" MAINTAINERS: Add myself as I2C host drivers maintainer
2 parents 6be5e47 + 33f3614 commit 022ce88

File tree

8 files changed

+37
-7
lines changed

8 files changed

+37
-7
lines changed

MAINTAINERS

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9696,8 +9696,9 @@ F: include/uapi/linux/i2c-*.h
96969696
F: include/uapi/linux/i2c.h
96979697

96989698
I2C SUBSYSTEM HOST DRIVERS
9699+
M: Andi Shyti <andi.shyti@kernel.org>
96999700
L: linux-i2c@vger.kernel.org
9700-
S: Odd Fixes
9701+
S: Maintained
97019702
W: https://i2c.wiki.kernel.org/
97029703
Q: https://patchwork.ozlabs.org/project/linux-i2c/list/
97039704
T: git git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git
@@ -18047,6 +18048,14 @@ S: Maintained
1804718048
F: Documentation/devicetree/bindings/usb/renesas,rzn1-usbf.yaml
1804818049
F: drivers/usb/gadget/udc/renesas_usbf.c
1804918050

18051+
RENESAS RZ/V2M I2C DRIVER
18052+
M: Fabrizio Castro <fabrizio.castro.jz@renesas.com>
18053+
L: linux-i2c@vger.kernel.org
18054+
L: linux-renesas-soc@vger.kernel.org
18055+
S: Supported
18056+
F: Documentation/devicetree/bindings/i2c/renesas,rzv2m.yaml
18057+
F: drivers/i2c/busses/i2c-rzv2m.c
18058+
1805018059
RENESAS USB PHY DRIVER
1805118060
M: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
1805218061
L: linux-renesas-soc@vger.kernel.org

drivers/i2c/busses/i2c-designware-core.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#define DW_IC_CON_BUS_CLEAR_CTRL BIT(11)
4141

4242
#define DW_IC_DATA_CMD_DAT GENMASK(7, 0)
43+
#define DW_IC_DATA_CMD_FIRST_DATA_BYTE BIT(11)
4344

4445
/*
4546
* Registers offset

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ static irqreturn_t i2c_dw_isr_slave(int this_irq, void *dev_id)
176176

177177
do {
178178
regmap_read(dev->map, DW_IC_DATA_CMD, &tmp);
179+
if (tmp & DW_IC_DATA_CMD_FIRST_DATA_BYTE)
180+
i2c_slave_event(dev->slave,
181+
I2C_SLAVE_WRITE_REQUESTED,
182+
&val);
179183
val = tmp;
180184
i2c_slave_event(dev->slave, I2C_SLAVE_WRITE_RECEIVED,
181185
&val);

drivers/i2c/busses/i2c-img-scb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@
257257
#define IMG_I2C_TIMEOUT (msecs_to_jiffies(1000))
258258

259259
/*
260-
* Worst incs are 1 (innacurate) and 16*256 (irregular).
260+
* Worst incs are 1 (inaccurate) and 16*256 (irregular).
261261
* So a sensible inc is the logarithmic mean: 64 (2^6), which is
262262
* in the middle of the valid range (0-127).
263263
*/

drivers/i2c/busses/i2c-mchp-pci1xxxx.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,8 +1118,10 @@ static int pci1xxxx_i2c_resume(struct device *dev)
11181118
static DEFINE_SIMPLE_DEV_PM_OPS(pci1xxxx_i2c_pm_ops, pci1xxxx_i2c_suspend,
11191119
pci1xxxx_i2c_resume);
11201120

1121-
static void pci1xxxx_i2c_shutdown(struct pci1xxxx_i2c *i2c)
1121+
static void pci1xxxx_i2c_shutdown(void *data)
11221122
{
1123+
struct pci1xxxx_i2c *i2c = data;
1124+
11231125
pci1xxxx_i2c_config_padctrl(i2c, false);
11241126
pci1xxxx_i2c_configure_core_reg(i2c, false);
11251127
}
@@ -1156,7 +1158,7 @@ static int pci1xxxx_i2c_probe_pci(struct pci_dev *pdev,
11561158
init_completion(&i2c->i2c_xfer_done);
11571159
pci1xxxx_i2c_init(i2c);
11581160

1159-
ret = devm_add_action(dev, (void (*)(void *))pci1xxxx_i2c_shutdown, i2c);
1161+
ret = devm_add_action(dev, pci1xxxx_i2c_shutdown, i2c);
11601162
if (ret)
11611163
return ret;
11621164

drivers/i2c/busses/i2c-mv64xxx.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,17 @@ mv64xxx_i2c_intr(int irq, void *dev_id)
520520

521521
while (readl(drv_data->reg_base + drv_data->reg_offsets.control) &
522522
MV64XXX_I2C_REG_CONTROL_IFLG) {
523+
/*
524+
* It seems that sometime the controller updates the status
525+
* register only after it asserts IFLG in control register.
526+
* This may result in weird bugs when in atomic mode. A delay
527+
* of 100 ns before reading the status register solves this
528+
* issue. This bug does not seem to appear when using
529+
* interrupts.
530+
*/
531+
if (drv_data->atomic)
532+
ndelay(100);
533+
523534
status = readl(drv_data->reg_base + drv_data->reg_offsets.status);
524535
mv64xxx_i2c_fsm(drv_data, status);
525536
mv64xxx_i2c_do_action(drv_data);

drivers/i2c/busses/i2c-sprd.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -576,12 +576,14 @@ static int sprd_i2c_remove(struct platform_device *pdev)
576576
struct sprd_i2c *i2c_dev = platform_get_drvdata(pdev);
577577
int ret;
578578

579-
ret = pm_runtime_resume_and_get(i2c_dev->dev);
579+
ret = pm_runtime_get_sync(i2c_dev->dev);
580580
if (ret < 0)
581-
return ret;
581+
dev_err(&pdev->dev, "Failed to resume device (%pe)\n", ERR_PTR(ret));
582582

583583
i2c_del_adapter(&i2c_dev->adap);
584-
clk_disable_unprepare(i2c_dev->clk);
584+
585+
if (ret >= 0)
586+
clk_disable_unprepare(i2c_dev->clk);
585587

586588
pm_runtime_put_noidle(i2c_dev->dev);
587589
pm_runtime_disable(i2c_dev->dev);

drivers/misc/eeprom/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ config EEPROM_AT24
66
depends on I2C && SYSFS
77
select NVMEM
88
select NVMEM_SYSFS
9+
select REGMAP
910
select REGMAP_I2C
1011
help
1112
Enable this driver to get read/write support to most I2C EEPROMs

0 commit comments

Comments
 (0)