summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorPhilippe Langlais <philippe.langlais@linaro.org>2011-03-21 11:31:20 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2011-12-06 10:46:56 +0100
commit30fc39abeaf942e135dcbc3e27814c97f6009480 (patch)
tree09b6c810bf8bac4863f9ab353b81d00e1af4a7d7 /drivers/i2c
parent6d0f0f319dc99c68296cf1850451dc4bec2093ab (diff)
i2c-nomadik: Add code to retry on timeout failure and set i2c clock to 400KHz
It is seen that i2c-nomadik controller randomly stops generating the interrupts leading to a i2c timeout. As a workaround to this problem add retries, to the on going transfer on failure. Since this behaviour does not get changed with a wait for longer duration, the timeout can be reduced to a lower value, leading to a quicker retry attempt. ST-Ericsson ID: ER 325661 Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com> Change-Id: Ic9db2b15ff5ce7e656cbbdfeb19270da9e32f9d1 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/16972 Tested-by: Virupax SADASHIVPETIMATH <virupax.sadashivpetimath@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-nomadik.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c
index 9ceca3f295f..775924fe96c 100644
--- a/drivers/i2c/busses/i2c-nomadik.c
+++ b/drivers/i2c/busses/i2c-nomadik.c
@@ -252,8 +252,6 @@ static int init_hw(struct nmk_i2c_dev *dev)
{
int stat;
- clk_enable(dev->clk);
-
stat = flush_i2c_fifo(dev);
if (stat)
goto exit;
@@ -268,8 +266,6 @@ static int init_hw(struct nmk_i2c_dev *dev)
dev->cli.operation = I2C_NO_OPERATION;
exit:
- clk_disable(dev->clk);
-
udelay(I2C_DELAY);
return stat;
}