Merge tag 'i2c-for-6.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
"Fixes for the I2C testunit, the Renesas R-Car driver and some
MAINTAINERS corrections"

* tag 'i2c-for-6.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
i2c: testunit: avoid re-issued work after read message
i2c: rcar: ensure Gen3+ reset does not disturb local targets
i2c: mark HostNotify target address as used
i2c: testunit: correct Kconfig description
MAINTAINERS: VIRTIO I2C loses a maintainer, gains a reviewer
MAINTAINERS: delete entries for Thor Thayer
i2c: rcar: clear NO_RXDMA flag after resetting
i2c: rcar: bring hardware to known state when probing

Changed files
+31 -29
drivers
+1 -22
MAINTAINERS
··· 846 846 R: Pali Rohár <pali@kernel.org> 847 847 F: drivers/input/mouse/alps.* 848 848 849 - ALTERA I2C CONTROLLER DRIVER 850 - M: Thor Thayer <thor.thayer@linux.intel.com> 851 - S: Maintained 852 - F: Documentation/devicetree/bindings/i2c/i2c-altera.txt 853 - F: drivers/i2c/busses/i2c-altera.c 854 - 855 849 ALTERA MAILBOX DRIVER 856 850 M: Mun Yew Tham <mun.yew.tham@intel.com> 857 851 S: Maintained ··· 864 870 L: linux-gpio@vger.kernel.org 865 871 S: Maintained 866 872 F: drivers/gpio/gpio-altera.c 867 - 868 - ALTERA SYSTEM MANAGER DRIVER 869 - M: Thor Thayer <thor.thayer@linux.intel.com> 870 - S: Maintained 871 - F: drivers/mfd/altera-sysmgr.c 872 - F: include/linux/mfd/altera-sysmgr.h 873 - 874 - ALTERA SYSTEM RESOURCE DRIVER FOR ARRIA10 DEVKIT 875 - M: Thor Thayer <thor.thayer@linux.intel.com> 876 - S: Maintained 877 - F: drivers/gpio/gpio-altera-a10sr.c 878 - F: drivers/mfd/altera-a10sr.c 879 - F: drivers/reset/reset-a10sr.c 880 - F: include/dt-bindings/reset/altr,rst-mgr-a10sr.h 881 - F: include/linux/mfd/altera-a10sr.h 882 873 883 874 ALTERA TRIPLE SPEED ETHERNET DRIVER 884 875 M: Joyce Ooi <joyce.ooi@intel.com> ··· 23843 23864 F: drivers/vhost/scsi.c 23844 23865 23845 23866 VIRTIO I2C DRIVER 23846 - M: Conghui Chen <conghui.chen@intel.com> 23847 23867 M: Viresh Kumar <viresh.kumar@linaro.org> 23868 + R: "Chen, Jian Jun" <jian.jun.chen@intel.com> 23848 23869 L: linux-i2c@vger.kernel.org 23849 23870 L: virtualization@lists.linux.dev 23850 23871 S: Maintained
+1 -1
drivers/i2c/Kconfig
··· 135 135 Documentation/i2c/slave-eeprom-backend.rst for further details. 136 136 137 137 config I2C_SLAVE_TESTUNIT 138 - tristate "I2C eeprom testunit driver" 138 + tristate "I2C testunit driver" 139 139 help 140 140 This backend can be used to trigger test cases for I2C bus masters 141 141 which require a remote device with certain capabilities, e.g.
+21 -6
drivers/i2c/busses/i2c-rcar.c
··· 257 257 } 258 258 } 259 259 260 + static void rcar_i2c_reset_slave(struct rcar_i2c_priv *priv) 261 + { 262 + rcar_i2c_write(priv, ICSIER, 0); 263 + rcar_i2c_write(priv, ICSSR, 0); 264 + rcar_i2c_write(priv, ICSCR, SDBS); 265 + rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */ 266 + } 267 + 260 268 static int rcar_i2c_bus_barrier(struct rcar_i2c_priv *priv) 261 269 { 262 270 int ret; ··· 883 875 { 884 876 int ret; 885 877 878 + /* Don't reset if a slave instance is currently running */ 879 + if (priv->slave) 880 + return -EISCONN; 881 + 886 882 ret = reset_control_reset(priv->rstc); 887 883 if (ret) 888 884 return ret; ··· 915 903 916 904 /* Gen3+ needs a reset. That also allows RXDMA once */ 917 905 if (priv->devtype >= I2C_RCAR_GEN3) { 918 - priv->flags &= ~ID_P_NO_RXDMA; 919 906 ret = rcar_i2c_do_reset(priv); 920 907 if (ret) 921 908 goto out; 909 + priv->flags &= ~ID_P_NO_RXDMA; 922 910 } 923 911 924 912 rcar_i2c_init(priv); ··· 1045 1033 1046 1034 /* ensure no irq is running before clearing ptr */ 1047 1035 disable_irq(priv->irq); 1048 - rcar_i2c_write(priv, ICSIER, 0); 1049 - rcar_i2c_write(priv, ICSSR, 0); 1036 + rcar_i2c_reset_slave(priv); 1050 1037 enable_irq(priv->irq); 1051 - rcar_i2c_write(priv, ICSCR, SDBS); 1052 - rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */ 1053 1038 1054 1039 priv->slave = NULL; 1055 1040 ··· 1161 1152 goto out_pm_disable; 1162 1153 } 1163 1154 1164 - rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */ 1155 + /* Bring hardware to known state */ 1156 + rcar_i2c_init(priv); 1157 + rcar_i2c_reset_slave(priv); 1165 1158 1166 1159 if (priv->devtype < I2C_RCAR_GEN3) { 1167 1160 irqflags |= IRQF_NO_THREAD; ··· 1179 1168 if (of_property_read_bool(dev->of_node, "smbus")) 1180 1169 priv->flags |= ID_P_HOST_NOTIFY; 1181 1170 1171 + /* R-Car Gen3+ needs a reset before every transfer */ 1182 1172 if (priv->devtype >= I2C_RCAR_GEN3) { 1183 1173 priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); 1184 1174 if (IS_ERR(priv->rstc)) { ··· 1190 1178 ret = reset_control_status(priv->rstc); 1191 1179 if (ret < 0) 1192 1180 goto out_pm_put; 1181 + 1182 + /* hard reset disturbs HostNotify local target, so disable it */ 1183 + priv->flags &= ~ID_P_HOST_NOTIFY; 1193 1184 } 1194 1185 1195 1186 ret = platform_get_irq(pdev, 0);
+1
drivers/i2c/i2c-core-base.c
··· 1067 1067 1068 1068 static const struct i2c_device_id dummy_id[] = { 1069 1069 { "dummy", 0 }, 1070 + { "smbus_host_notify", 0 }, 1070 1071 { }, 1071 1072 }; 1072 1073
+7
drivers/i2c/i2c-slave-testunit.c
··· 118 118 queue_delayed_work(system_long_wq, &tu->worker, 119 119 msecs_to_jiffies(10 * tu->regs[TU_REG_DELAY])); 120 120 } 121 + 122 + /* 123 + * Reset reg_idx to avoid that work gets queued again in case of 124 + * STOP after a following read message. But do not clear TU regs 125 + * here because we still need them in the workqueue! 126 + */ 127 + tu->reg_idx = 0; 121 128 break; 122 129 123 130 case I2C_SLAVE_WRITE_REQUESTED: