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
Unified · Split
| @@ -846,12 +846,6 @@ ALPS PS/2 TOUCHPAD DRIVER · 845 unmodified lines | ||
| 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 |
| @@ -871,21 +865,6 @@ L: linux-gpio@vger.kernel.org · 13 unmodified lines | ||
| 871 | 865 | S: Maintained |
| 872 | 866 | F: drivers/gpio/gpio-altera.c |
| 873 | 867 | |
| 874 | −ALTERA SYSTEM MANAGER DRIVER | |
| 875 | −M: Thor Thayer <thor.thayer@linux.intel.com> | |
| 876 | −S: Maintained | |
| 877 | −F: drivers/mfd/altera-sysmgr.c | |
| 878 | −F: include/linux/mfd/altera-sysmgr.h | |
| 879 | − | |
| 880 | −ALTERA SYSTEM RESOURCE DRIVER FOR ARRIA10 DEVKIT | |
| 881 | −M: Thor Thayer <thor.thayer@linux.intel.com> | |
| 882 | −S: Maintained | |
| 883 | −F: drivers/gpio/gpio-altera-a10sr.c | |
| 884 | −F: drivers/mfd/altera-a10sr.c | |
| 885 | −F: drivers/reset/reset-a10sr.c | |
| 886 | −F: include/dt-bindings/reset/altr,rst-mgr-a10sr.h | |
| 887 | −F: include/linux/mfd/altera-a10sr.h | |
| 888 | − | |
| 889 | 868 | ALTERA TRIPLE SPEED ETHERNET DRIVER |
| 890 | 869 | M: Joyce Ooi <joyce.ooi@intel.com> |
| 891 | 870 | L: netdev@vger.kernel.org |
| @@ -23864,8 +23843,8 @@ S: Maintained · 22972 unmodified lines | ||
| 23864 | 23843 | F: drivers/vhost/scsi.c |
| 23865 | 23844 | |
| 23866 | 23845 | VIRTIO I2C DRIVER |
| 23867 | −M: Conghui Chen <conghui.chen@intel.com> | |
| 23868 | 23846 | M: Viresh Kumar <viresh.kumar@linaro.org> |
| 23847 | +R: "Chen, Jian Jun" <jian.jun.chen@intel.com> | |
| 23869 | 23848 | L: linux-i2c@vger.kernel.org |
| 23870 | 23849 | L: virtualization@lists.linux.dev |
| 23871 | 23850 | S: Maintained |
| @@ -135,7 +135,7 @@ config I2C_SLAVE_EEPROM · 134 unmodified lines | ||
| 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. |
| @@ -257,6 +257,14 @@ static void rcar_i2c_init(struct rcar_i2c_priv *priv) · 256 unmodified lines | ||
| 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; |
| @@ -875,6 +883,10 @@ static int rcar_i2c_do_reset(struct rcar_i2c_priv *priv) · 612 unmodified lines | ||
| 875 | 883 | { |
| 876 | 884 | int ret; |
| 877 | 885 | |
| 886 | + /* Don't reset if a slave instance is currently running */ | |
| 887 | + if (priv->slave) | |
| 888 | + return -EISCONN; | |
| 889 | + | |
| 878 | 890 | ret = reset_control_reset(priv->rstc); |
| 879 | 891 | if (ret) |
| 880 | 892 | return ret; |
| @@ -903,10 +915,10 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap, · 22 unmodified lines | ||
| 903 | 915 | |
| 904 | 916 | /* Gen3+ needs a reset. That also allows RXDMA once */ |
| 905 | 917 | if (priv->devtype >= I2C_RCAR_GEN3) { |
| 906 | − priv->flags &= ~ID_P_NO_RXDMA; | |
| 907 | 918 | ret = rcar_i2c_do_reset(priv); |
| 908 | 919 | if (ret) |
| 909 | 920 | goto out; |
| 921 | + priv->flags &= ~ID_P_NO_RXDMA; | |
| 910 | 922 | } |
| 911 | 923 | |
| 912 | 924 | rcar_i2c_init(priv); |
| @@ -1033,11 +1045,8 @@ static int rcar_unreg_slave(struct i2c_client *slave) · 120 unmodified lines | ||
| 1033 | 1045 | |
| 1034 | 1046 | /* ensure no irq is running before clearing ptr */ |
| 1035 | 1047 | disable_irq(priv->irq); |
| 1036 | − rcar_i2c_write(priv, ICSIER, 0); | |
| 1037 | − rcar_i2c_write(priv, ICSSR, 0); | |
| 1048 | + rcar_i2c_reset_slave(priv); | |
| 1038 | 1049 | enable_irq(priv->irq); |
| 1039 | − rcar_i2c_write(priv, ICSCR, SDBS); | |
| 1040 | − rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */ | |
| 1041 | 1050 | |
| 1042 | 1051 | priv->slave = NULL; |
| 1043 | 1052 | |
| @@ -1152,7 +1161,9 @@ static int rcar_i2c_probe(struct platform_device *pdev) · 108 unmodified lines | ||
| 1152 | 1161 | goto out_pm_disable; |
| 1153 | 1162 | } |
| 1154 | 1163 | |
| 1155 | − rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */ | |
| 1164 | + /* Bring hardware to known state */ | |
| 1165 | + rcar_i2c_init(priv); | |
| 1166 | + rcar_i2c_reset_slave(priv); | |
| 1156 | 1167 | |
| 1157 | 1168 | if (priv->devtype < I2C_RCAR_GEN3) { |
| 1158 | 1169 | irqflags |= IRQF_NO_THREAD; |
| @@ -1168,6 +1179,7 @@ static int rcar_i2c_probe(struct platform_device *pdev) · 9 unmodified lines | ||
| 1168 | 1179 | if (of_property_read_bool(dev->of_node, "smbus")) |
| 1169 | 1180 | priv->flags |= ID_P_HOST_NOTIFY; |
| 1170 | 1181 | |
| 1182 | + /* R-Car Gen3+ needs a reset before every transfer */ | |
| 1171 | 1183 | if (priv->devtype >= I2C_RCAR_GEN3) { |
| 1172 | 1184 | priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); |
| 1173 | 1185 | if (IS_ERR(priv->rstc)) { |
| @@ -1178,6 +1190,9 @@ static int rcar_i2c_probe(struct platform_device *pdev) · 4 unmodified lines | ||
| 1178 | 1190 | ret = reset_control_status(priv->rstc); |
| 1179 | 1191 | if (ret < 0) |
| 1180 | 1192 | goto out_pm_put; |
| 1193 | + | |
| 1194 | + /* hard reset disturbs HostNotify local target, so disable it */ | |
| 1195 | + priv->flags &= ~ID_P_HOST_NOTIFY; | |
| 1181 | 1196 | } |
| 1182 | 1197 | |
| 1183 | 1198 | ret = platform_get_irq(pdev, 0); |
| @@ -1067,6 +1067,7 @@ EXPORT_SYMBOL(i2c_find_device_by_fwnode); · 1066 unmodified lines | ||
| 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 | |
| @@ -118,6 +118,13 @@ static int i2c_slave_testunit_slave_cb(struct i2c_client *client, · 117 unmodified lines | ||
| 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: |