i2c: qup: change completion timeout according to transfer length
authorAbhishek Sahu <absahu@codeaurora.org>
Mon, 12 Mar 2018 13:14:58 +0000 (18:44 +0530)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 24 Mar 2018 12:20:20 +0000 (13:20 +0100)
commitecb6e1e5f4352055a5761b945a833a925d51bf8d
tree2756f6072ba0e8c76e47dce06bf9077abfa66dbe
parent08f15963bc751bc818294c0f75a9aaca299c4052
i2c: qup: change completion timeout according to transfer length

Currently the completion timeout is being taken according to
maximum transfer length which is too high if SCL is operating in
high frequency. This patch calculates timeout on the basis of
one-byte transfer time and uses the same for completion timeout.

Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
Reviewed-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-qup.c