i2c: tegra: make sure register writes completes
authorLaxman Dewangan <ldewangan@nvidia.com>
Wed, 13 Jun 2012 10:12:36 +0000 (15:12 +0530)
committerVarun Wadekar <vwadekar@nvidia.com>
Mon, 30 Jul 2012 10:34:19 +0000 (15:34 +0530)
commitcd786686d6b877560339d3eb61fecdea766a228a
tree92156d6e720b900fdaa5fc43ff0ed4a9ca77b11c
parent4e81000c5a0b4f7c114a18bfbd5cde2966a9acff
i2c: tegra: make sure register writes completes

The Tegra PPSB (an peripheral bus) queues writes transactions.
In order to guarantee that writes have completed before a
certain time, a read transaction to a register on the same
bus must be executed.
This is necessary in situations such as when clearing an
interrupt status or enable, so that when returning from an
interrupt handler, the HW has already de-asserted its
interrupt status output, which will avoid spurious interrupts.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cherry-picked from mainline
ec7aaca2f64f509f45d463d784b41d0b3d2be083

Change-Id: I4f064c38993031303bfeef794015efd5517561cc
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/116469
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Bandi Krishna Chaitanya <bandik@nvidia.com>
drivers/i2c/busses/i2c-tegra.c