i2c: tegra: Add delay before resetting the controller after NACK
authorLaxman Dewangan <ldewangan@nvidia.com>
Wed, 22 Aug 2012 08:13:08 +0000 (13:13 +0530)
committerSimone Willett <swillett@nvidia.com>
Wed, 22 Aug 2012 19:05:25 +0000 (12:05 -0700)
commitf13284fab49d2ca544fda157ba8006ab1004cc1a
treed493b19724cb81cb414e14ce327acb1657605c08
parent064618cb59271bf674f489219028807ff712b241
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>

Taken change from mainline commit.

Change-Id: Id089aae313614e58ec6da36eda4ff2d87c5cddc3
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/125148
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
drivers/i2c/busses/i2c-tegra.c