summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorPhilippe Langlais <philippe.langlais@linaro.org>2011-05-10 11:07:02 +0200
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 10:59:46 +0200
commit115ce085c89048f32210496999cc0237d2fd67ab (patch)
treef26491b5039946b71686f871134e7f8ef77d05e5 /drivers/i2c
parentb45848a2980d1003746fd83cd46a09bf031ec887 (diff)
i2c-nomadik: Reset the hw after status check
In case of I2C timeout, reset the HW only after the HW status is read, otherwise the staus will be lost. ST-Ericsson ID: ER334949 Change-Id: I93295122fa38d0ea82780d54af7f5de1fa099369 Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/20986 Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com> Conflicts: drivers/i2c/busses/i2c-nomadik.c
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-nomadik.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c
index b3436b88b9f..e6f2abba469 100644
--- a/drivers/i2c/busses/i2c-nomadik.c
+++ b/drivers/i2c/busses/i2c-nomadik.c
@@ -430,10 +430,9 @@ static int read_i2c(struct nmk_i2c_dev *dev)
}
if (timeout == 0) {
- /* controller has timedout, re-init the h/w */
+ /* Controller timed out */
dev_err(&dev->pdev->dev, "Read from Slave 0x%x timed out\n",
dev->cli.slave_adr);
- (void) init_hw(dev);
status = -ETIMEDOUT;
}
return status;
@@ -518,10 +517,9 @@ static int write_i2c(struct nmk_i2c_dev *dev)
}
if (timeout == 0) {
- /* controller has timedout, re-init the h/w */
+ /* Controller timed out */
dev_err(&dev->pdev->dev, "Write to slave 0x%x timed out\n",
dev->cli.slave_adr);
- (void) init_hw(dev);
status = -ETIMEDOUT;
}