i2c: tegra: update transfer timeout
authorSowjanya Komatineni <skomatineni@nvidia.com>
Tue, 12 Feb 2019 19:06:47 +0000 (11:06 -0800)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 14 Feb 2019 16:48:42 +0000 (17:48 +0100)
commit80d40626cc76f65f2699573a95ecc90a31dcf50e
treea5f0b2eb80522f01b0c5ef77988c55079334e8e8
parent86c92b9965ff1758952cd0d6c5f19eeeef291eea
i2c: tegra: update transfer timeout

Tegra194 allows max of 64K bytes and Tegra186 and prior allows
max of 4K bytes of transfer per packet.

one sec timeout is not enough for transfers more than 10K bytes
at STD bus rate.

This patch updates I2C transfer timeout based on the transfer size
and I2C bus rate to allow enough time during max transfer size at
lower bus speed.

Acked-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-tegra.c