summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJin Park <jinyoungp@nvidia.com>2011-01-19 14:41:42 +0900
committerNiket Sirsi <nsirsi@nvidia.com>2011-01-28 19:36:49 -0800
commit6bab778a4b0caf58e464847c827d988a566bd434 (patch)
tree1cb945fbcf00f89cada57f0fa618399a12f1009f /include
parent8197cb15eaf0640d13c816926f65972ca6cbba84 (diff)
i2c-tegra: Retry transfer when unexpected status is detected
Sometimes unexpected status like I2C busy status, Tx FIFO interrupted and wait on Rx data etc is seen. Add a code to detect such conditions and return -EAGAIN from driver. This will cause the i2c-core to retry the transmission as per the retry count and time-out specified by the platform data of the adapter. Bug ID: 777455 Change-Id: Iac5971bca4d760d93cd2ed147f78fc2807315b4e Signed-off-by: Jin Park <jinyoungp@nvidia.com> Reviewed-on: http://git-master/r/16212 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/i2c-tegra.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/i2c-tegra.h b/include/linux/i2c-tegra.h
index 6123502b8ddd..f92fe26c7535 100644
--- a/include/linux/i2c-tegra.h
+++ b/include/linux/i2c-tegra.h
@@ -29,6 +29,8 @@ struct tegra_i2c_platform_data {
int bus_mux_len[TEGRA_I2C_MAX_BUS];
unsigned long bus_clk_rate[TEGRA_I2C_MAX_BUS];
bool is_dvc;
+ int retries;
+ int timeout; /* in jiffies */
};
#endif /* _LINUX_I2C_TEGRA_H */