i2c: tegra: Return -EAGAIN in case of ARB Lost
Chaitanya Bandi [Wed, 30 Jan 2013 04:39:14 +0000 (09:39 +0530)]
In case of ARB lost, return -EAGAIN so that the
communication is retried.

Bug 1222180

Change-Id: I003e02732568e08fabf6fe15f687e6ae73169f66
Signed-off-by: Chaitanya Bandi <bandik@nvidia.com>
Reviewed-on: http://git-master/r/195401
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sri Krishna Chowdary <schowdary@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

drivers/i2c/busses/i2c-tegra.c

index 003ceb1..9a42f64 100644 (file)
@@ -936,6 +936,7 @@ static int tegra_i2c_xfer_msg(struct tegra_i2c_bus *i2c_bus,
                } else if (i2c_dev->arb_recovery)
                        i2c_dev->arb_recovery(i2c_bus->scl_gpio,
                                                        i2c_bus->sda_gpio);
+               return -EAGAIN;
        }
 
        if (i2c_dev->msg_err == I2C_ERR_NO_ACK) {