i2c: tegra: Add delay before resetting the controller after NACK
authorAlok Chauhan <alokc@nvidia.com>
Mon, 2 Apr 2012 05:53:02 +0000 (11:23 +0530)
committerWolfram Sang <w.sang@pengutronix.de>
Sun, 22 Apr 2012 19:29:05 +0000 (21:29 +0200)
commitf70893d08338b9cab8008d2e30404ce58930a513
tree69ae57606254ebe2598791895cea425143f25d41
parent6c557cfee08751d22aed34840f389b846f0f4508
i2c: tegra: Add delay before resetting the controller after NACK

NACK interrupt is generated before I2C controller generates the STOP
condition on bus. Because of this reset of controller is happening
before I2C controller could complete STOP condition. So wait for some
time before resetting the controller so that STOP condition has
delivered properly on bus.

Added delay of 2 clock period before resetting the controller in case of
NACK error.

Signed-off-by: Alok Chauhan <alokc@nvidia.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
[wsa: Reworded the commit msg and code comment a bit]

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
drivers/i2c/busses/i2c-tegra.c