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

+37 -7
+10 -1
MAINTAINERS
··· 9696 F: include/uapi/linux/i2c.h 9697 9698 I2C SUBSYSTEM HOST DRIVERS 9699 L: linux-i2c@vger.kernel.org 9700 - S: Odd Fixes 9701 W: https://i2c.wiki.kernel.org/ 9702 Q: https://patchwork.ozlabs.org/project/linux-i2c/list/ 9703 T: git git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git ··· 18047 S: Maintained 18048 F: Documentation/devicetree/bindings/usb/renesas,rzn1-usbf.yaml 18049 F: drivers/usb/gadget/udc/renesas_usbf.c 18050 18051 RENESAS USB PHY DRIVER 18052 M: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
··· 9696 F: include/uapi/linux/i2c.h 9697 9698 I2C SUBSYSTEM HOST DRIVERS 9699 + M: Andi Shyti <andi.shyti@kernel.org> 9700 L: linux-i2c@vger.kernel.org 9701 + S: Maintained 9702 W: https://i2c.wiki.kernel.org/ 9703 Q: https://patchwork.ozlabs.org/project/linux-i2c/list/ 9704 T: git git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git ··· 18046 S: Maintained 18047 F: Documentation/devicetree/bindings/usb/renesas,rzn1-usbf.yaml 18048 F: drivers/usb/gadget/udc/renesas_usbf.c 18049 + 18050 + RENESAS RZ/V2M I2C DRIVER 18051 + M: Fabrizio Castro <fabrizio.castro.jz@renesas.com> 18052 + L: linux-i2c@vger.kernel.org 18053 + L: linux-renesas-soc@vger.kernel.org 18054 + S: Supported 18055 + F: Documentation/devicetree/bindings/i2c/renesas,rzv2m.yaml 18056 + F: drivers/i2c/busses/i2c-rzv2m.c 18057 18058 RENESAS USB PHY DRIVER 18059 M: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
+1
drivers/i2c/busses/i2c-designware-core.h
··· 40 #define DW_IC_CON_BUS_CLEAR_CTRL BIT(11) 41 42 #define DW_IC_DATA_CMD_DAT GENMASK(7, 0) 43 44 /* 45 * Registers offset
··· 40 #define DW_IC_CON_BUS_CLEAR_CTRL BIT(11) 41 42 #define DW_IC_DATA_CMD_DAT GENMASK(7, 0) 43 + #define DW_IC_DATA_CMD_FIRST_DATA_BYTE BIT(11) 44 45 /* 46 * Registers offset
+4
drivers/i2c/busses/i2c-designware-slave.c
··· 176 177 do { 178 regmap_read(dev->map, DW_IC_DATA_CMD, &tmp); 179 val = tmp; 180 i2c_slave_event(dev->slave, I2C_SLAVE_WRITE_RECEIVED, 181 &val);
··· 176 177 do { 178 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); 183 val = tmp; 184 i2c_slave_event(dev->slave, I2C_SLAVE_WRITE_RECEIVED, 185 &val);
+1 -1
drivers/i2c/busses/i2c-img-scb.c
··· 257 #define IMG_I2C_TIMEOUT (msecs_to_jiffies(1000)) 258 259 /* 260 - * Worst incs are 1 (innacurate) and 16*256 (irregular). 261 * So a sensible inc is the logarithmic mean: 64 (2^6), which is 262 * in the middle of the valid range (0-127). 263 */
··· 257 #define IMG_I2C_TIMEOUT (msecs_to_jiffies(1000)) 258 259 /* 260 + * Worst incs are 1 (inaccurate) and 16*256 (irregular). 261 * So a sensible inc is the logarithmic mean: 64 (2^6), which is 262 * in the middle of the valid range (0-127). 263 */
+4 -2
drivers/i2c/busses/i2c-mchp-pci1xxxx.c
··· 1118 static DEFINE_SIMPLE_DEV_PM_OPS(pci1xxxx_i2c_pm_ops, pci1xxxx_i2c_suspend, 1119 pci1xxxx_i2c_resume); 1120 1121 - static void pci1xxxx_i2c_shutdown(struct pci1xxxx_i2c *i2c) 1122 { 1123 pci1xxxx_i2c_config_padctrl(i2c, false); 1124 pci1xxxx_i2c_configure_core_reg(i2c, false); 1125 } ··· 1158 init_completion(&i2c->i2c_xfer_done); 1159 pci1xxxx_i2c_init(i2c); 1160 1161 - ret = devm_add_action(dev, (void (*)(void *))pci1xxxx_i2c_shutdown, i2c); 1162 if (ret) 1163 return ret; 1164
··· 1118 static DEFINE_SIMPLE_DEV_PM_OPS(pci1xxxx_i2c_pm_ops, pci1xxxx_i2c_suspend, 1119 pci1xxxx_i2c_resume); 1120 1121 + static void pci1xxxx_i2c_shutdown(void *data) 1122 { 1123 + struct pci1xxxx_i2c *i2c = data; 1124 + 1125 pci1xxxx_i2c_config_padctrl(i2c, false); 1126 pci1xxxx_i2c_configure_core_reg(i2c, false); 1127 } ··· 1156 init_completion(&i2c->i2c_xfer_done); 1157 pci1xxxx_i2c_init(i2c); 1158 1159 + ret = devm_add_action(dev, pci1xxxx_i2c_shutdown, i2c); 1160 if (ret) 1161 return ret; 1162
+11
drivers/i2c/busses/i2c-mv64xxx.c
··· 520 521 while (readl(drv_data->reg_base + drv_data->reg_offsets.control) & 522 MV64XXX_I2C_REG_CONTROL_IFLG) { 523 status = readl(drv_data->reg_base + drv_data->reg_offsets.status); 524 mv64xxx_i2c_fsm(drv_data, status); 525 mv64xxx_i2c_do_action(drv_data);
··· 520 521 while (readl(drv_data->reg_base + drv_data->reg_offsets.control) & 522 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 + 534 status = readl(drv_data->reg_base + drv_data->reg_offsets.status); 535 mv64xxx_i2c_fsm(drv_data, status); 536 mv64xxx_i2c_do_action(drv_data);
+5 -3
drivers/i2c/busses/i2c-sprd.c
··· 576 struct sprd_i2c *i2c_dev = platform_get_drvdata(pdev); 577 int ret; 578 579 - ret = pm_runtime_resume_and_get(i2c_dev->dev); 580 if (ret < 0) 581 - return ret; 582 583 i2c_del_adapter(&i2c_dev->adap); 584 - clk_disable_unprepare(i2c_dev->clk); 585 586 pm_runtime_put_noidle(i2c_dev->dev); 587 pm_runtime_disable(i2c_dev->dev);
··· 576 struct sprd_i2c *i2c_dev = platform_get_drvdata(pdev); 577 int ret; 578 579 + ret = pm_runtime_get_sync(i2c_dev->dev); 580 if (ret < 0) 581 + dev_err(&pdev->dev, "Failed to resume device (%pe)\n", ERR_PTR(ret)); 582 583 i2c_del_adapter(&i2c_dev->adap); 584 + 585 + if (ret >= 0) 586 + clk_disable_unprepare(i2c_dev->clk); 587 588 pm_runtime_put_noidle(i2c_dev->dev); 589 pm_runtime_disable(i2c_dev->dev);
+1
drivers/misc/eeprom/Kconfig
··· 6 depends on I2C && SYSFS 7 select NVMEM 8 select NVMEM_SYSFS 9 select REGMAP_I2C 10 help 11 Enable this driver to get read/write support to most I2C EEPROMs
··· 6 depends on I2C && SYSFS 7 select NVMEM 8 select NVMEM_SYSFS 9 + select REGMAP 10 select REGMAP_I2C 11 help 12 Enable this driver to get read/write support to most I2C EEPROMs