Merge tag 'v5.8-rc7' into i2c/for-5.9
[linux-2.6-microblaze.git] / drivers / i2c / busses / i2c-rcar.c
index c2921e1..76c615b 100644 (file)
@@ -869,6 +869,7 @@ static int rcar_unreg_slave(struct i2c_client *slave)
        /* disable irqs and ensure none is running before clearing ptr */
        rcar_i2c_write(priv, ICSIER, 0);
        rcar_i2c_write(priv, ICSCR, 0);
+       rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */
 
        synchronize_irq(priv->irq);
        priv->slave = NULL;
@@ -970,6 +971,8 @@ static int rcar_i2c_probe(struct platform_device *pdev)
        if (ret < 0)
                goto out_pm_put;
 
+       rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */
+
        if (priv->devtype == I2C_RCAR_GEN3) {
                priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
                if (!IS_ERR(priv->rstc)) {