mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
i2c: designware: Use transfer timeout from ioctl I2C_TIMEOUT
This allows applications to set the transfer timeout in 10ms increments via ioctl I2C_TIMEOUT. Signed-off-by: Weifeng Voon <[email protected]> Acked-by: Jarkko Nikula <[email protected]> Acked-by: Uwe Kleine-König <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
This commit is contained in:
parent
0130944bc1
commit
d0bcd8df9a
1 changed files with 1 additions and 1 deletions
|
|
@ -663,7 +663,7 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
|
|||
i2c_dw_xfer_init(dev);
|
||||
|
||||
/* wait for tx to complete */
|
||||
if (!wait_for_completion_timeout(&dev->cmd_complete, HZ)) {
|
||||
if (!wait_for_completion_timeout(&dev->cmd_complete, adap->timeout)) {
|
||||
dev_err(dev->dev, "controller timed out\n");
|
||||
/* i2c_dw_init implicitly disables the adapter */
|
||||
i2c_dw_init(dev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue