mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-28 16:56:26 +00:00
Fixes for the I2C testunit, the Renesas R-Car driver and some
MAINTAINERS corrections. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmaTAd4ACgkQFA3kzBSg KbZgow/+PFBB3LWKhyyU01MGYa/MjYMYx5JaUUgrhMsicOhGk127Y4X9T74mMmgx hZg5aXQVgfGA0IUUAvayFWGuDHqupXq2PMWKoP7o5f3DGnOl61qyRE2CmSaqqwh4 33nLK7Nh+28I1AOOaNHr2qGcIub7J5GrbUa7AQS1dC7hKfDxSb0w+IF/o09Vm8Hw CRF3yvL22fQp1a1v2pOCWiL9y6UxndYakz7s1VaD/jKqYPMsSXj+fStlFUgs/9lp j5kzJnj6JiSpqFhTYr1gzuMO1w5Nnnd/Dn6YzOHjRAXJxLGzT9RzjA1Rk9hGfZfF VLdBx8ARnHpWxAkF2Vs98qgnQ1QgepI4Yb3ve41jtgLn1FACLpXkAyv0t9+NMop6 azbdaUmYrhAZzlOi4sZh3/wYYOKo4lvoUAKBj7tDpIBmDftr1TPvbguiCVVLmudH AUn0ik2oZZM0BonCqqZOh4HrCjhnhwNb8ysdFtaw+9WcwMTVPObartqNGSH7Ruhr o4ZJxsYA4OY8l6DsRBsYejENng3TCOj2qw8oUPayWpPEv1c9SgBKWl9MFO19T0N1 IzJuqj+npz0BzRUziMQc0aaLJdjQ2e1ol0q7G1ToS1yWjWM/Bsx9yjHtAvwPn7kp hqRH8ZJhkOkOCllZSI7LZ6kj5DeL5uvl4zAJJaOYfS/8zsxiB2I= =pJyG -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
4d145e3f83
23
MAINTAINERS
23
MAINTAINERS
@ -846,12 +846,6 @@ ALPS PS/2 TOUCHPAD DRIVER
|
||||
R: Pali Rohár <pali@kernel.org>
|
||||
F: drivers/input/mouse/alps.*
|
||||
|
||||
ALTERA I2C CONTROLLER DRIVER
|
||||
M: Thor Thayer <thor.thayer@linux.intel.com>
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/i2c/i2c-altera.txt
|
||||
F: drivers/i2c/busses/i2c-altera.c
|
||||
|
||||
ALTERA MAILBOX DRIVER
|
||||
M: Mun Yew Tham <mun.yew.tham@intel.com>
|
||||
S: Maintained
|
||||
@ -871,21 +865,6 @@ L: linux-gpio@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/gpio/gpio-altera.c
|
||||
|
||||
ALTERA SYSTEM MANAGER DRIVER
|
||||
M: Thor Thayer <thor.thayer@linux.intel.com>
|
||||
S: Maintained
|
||||
F: drivers/mfd/altera-sysmgr.c
|
||||
F: include/linux/mfd/altera-sysmgr.h
|
||||
|
||||
ALTERA SYSTEM RESOURCE DRIVER FOR ARRIA10 DEVKIT
|
||||
M: Thor Thayer <thor.thayer@linux.intel.com>
|
||||
S: Maintained
|
||||
F: drivers/gpio/gpio-altera-a10sr.c
|
||||
F: drivers/mfd/altera-a10sr.c
|
||||
F: drivers/reset/reset-a10sr.c
|
||||
F: include/dt-bindings/reset/altr,rst-mgr-a10sr.h
|
||||
F: include/linux/mfd/altera-a10sr.h
|
||||
|
||||
ALTERA TRIPLE SPEED ETHERNET DRIVER
|
||||
M: Joyce Ooi <joyce.ooi@intel.com>
|
||||
L: netdev@vger.kernel.org
|
||||
@ -23864,8 +23843,8 @@ S: Maintained
|
||||
F: drivers/vhost/scsi.c
|
||||
|
||||
VIRTIO I2C DRIVER
|
||||
M: Conghui Chen <conghui.chen@intel.com>
|
||||
M: Viresh Kumar <viresh.kumar@linaro.org>
|
||||
R: "Chen, Jian Jun" <jian.jun.chen@intel.com>
|
||||
L: linux-i2c@vger.kernel.org
|
||||
L: virtualization@lists.linux.dev
|
||||
S: Maintained
|
||||
|
@ -135,7 +135,7 @@ config I2C_SLAVE_EEPROM
|
||||
Documentation/i2c/slave-eeprom-backend.rst for further details.
|
||||
|
||||
config I2C_SLAVE_TESTUNIT
|
||||
tristate "I2C eeprom testunit driver"
|
||||
tristate "I2C testunit driver"
|
||||
help
|
||||
This backend can be used to trigger test cases for I2C bus masters
|
||||
which require a remote device with certain capabilities, e.g.
|
||||
|
@ -257,6 +257,14 @@ static void rcar_i2c_init(struct rcar_i2c_priv *priv)
|
||||
}
|
||||
}
|
||||
|
||||
static void rcar_i2c_reset_slave(struct rcar_i2c_priv *priv)
|
||||
{
|
||||
rcar_i2c_write(priv, ICSIER, 0);
|
||||
rcar_i2c_write(priv, ICSSR, 0);
|
||||
rcar_i2c_write(priv, ICSCR, SDBS);
|
||||
rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */
|
||||
}
|
||||
|
||||
static int rcar_i2c_bus_barrier(struct rcar_i2c_priv *priv)
|
||||
{
|
||||
int ret;
|
||||
@ -875,6 +883,10 @@ static int rcar_i2c_do_reset(struct rcar_i2c_priv *priv)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Don't reset if a slave instance is currently running */
|
||||
if (priv->slave)
|
||||
return -EISCONN;
|
||||
|
||||
ret = reset_control_reset(priv->rstc);
|
||||
if (ret)
|
||||
return ret;
|
||||
@ -903,10 +915,10 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
|
||||
|
||||
/* Gen3+ needs a reset. That also allows RXDMA once */
|
||||
if (priv->devtype >= I2C_RCAR_GEN3) {
|
||||
priv->flags &= ~ID_P_NO_RXDMA;
|
||||
ret = rcar_i2c_do_reset(priv);
|
||||
if (ret)
|
||||
goto out;
|
||||
priv->flags &= ~ID_P_NO_RXDMA;
|
||||
}
|
||||
|
||||
rcar_i2c_init(priv);
|
||||
@ -1033,11 +1045,8 @@ static int rcar_unreg_slave(struct i2c_client *slave)
|
||||
|
||||
/* ensure no irq is running before clearing ptr */
|
||||
disable_irq(priv->irq);
|
||||
rcar_i2c_write(priv, ICSIER, 0);
|
||||
rcar_i2c_write(priv, ICSSR, 0);
|
||||
rcar_i2c_reset_slave(priv);
|
||||
enable_irq(priv->irq);
|
||||
rcar_i2c_write(priv, ICSCR, SDBS);
|
||||
rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */
|
||||
|
||||
priv->slave = NULL;
|
||||
|
||||
@ -1152,7 +1161,9 @@ static int rcar_i2c_probe(struct platform_device *pdev)
|
||||
goto out_pm_disable;
|
||||
}
|
||||
|
||||
rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */
|
||||
/* Bring hardware to known state */
|
||||
rcar_i2c_init(priv);
|
||||
rcar_i2c_reset_slave(priv);
|
||||
|
||||
if (priv->devtype < I2C_RCAR_GEN3) {
|
||||
irqflags |= IRQF_NO_THREAD;
|
||||
@ -1168,6 +1179,7 @@ static int rcar_i2c_probe(struct platform_device *pdev)
|
||||
if (of_property_read_bool(dev->of_node, "smbus"))
|
||||
priv->flags |= ID_P_HOST_NOTIFY;
|
||||
|
||||
/* R-Car Gen3+ needs a reset before every transfer */
|
||||
if (priv->devtype >= I2C_RCAR_GEN3) {
|
||||
priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
|
||||
if (IS_ERR(priv->rstc)) {
|
||||
@ -1178,6 +1190,9 @@ static int rcar_i2c_probe(struct platform_device *pdev)
|
||||
ret = reset_control_status(priv->rstc);
|
||||
if (ret < 0)
|
||||
goto out_pm_put;
|
||||
|
||||
/* hard reset disturbs HostNotify local target, so disable it */
|
||||
priv->flags &= ~ID_P_HOST_NOTIFY;
|
||||
}
|
||||
|
||||
ret = platform_get_irq(pdev, 0);
|
||||
|
@ -1067,6 +1067,7 @@ EXPORT_SYMBOL(i2c_find_device_by_fwnode);
|
||||
|
||||
static const struct i2c_device_id dummy_id[] = {
|
||||
{ "dummy", 0 },
|
||||
{ "smbus_host_notify", 0 },
|
||||
{ },
|
||||
};
|
||||
|
||||
|
@ -118,6 +118,13 @@ static int i2c_slave_testunit_slave_cb(struct i2c_client *client,
|
||||
queue_delayed_work(system_long_wq, &tu->worker,
|
||||
msecs_to_jiffies(10 * tu->regs[TU_REG_DELAY]));
|
||||
}
|
||||
|
||||
/*
|
||||
* Reset reg_idx to avoid that work gets queued again in case of
|
||||
* STOP after a following read message. But do not clear TU regs
|
||||
* here because we still need them in the workqueue!
|
||||
*/
|
||||
tu->reg_idx = 0;
|
||||
break;
|
||||
|
||||
case I2C_SLAVE_WRITE_REQUESTED:
|
||||
|
Loading…
Reference in New Issue
Block a user