diff options
author | Weifeng Voon <weifeng.voon@intel.com> | 2016-06-17 03:46:35 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2016-06-19 18:52:44 +0200 |
commit | d0bcd8df9aea2bcdbfcb074d408bdc7136031bc5 (patch) | |
tree | 2750ef9c66fe3b44cc59c9a4795415c0262ba80a /drivers/i2c/busses | |
parent | i2c: qup: use address helper function in read transfer (diff) | |
download | linux-d0bcd8df9aea2bcdbfcb074d408bdc7136031bc5.tar.xz linux-d0bcd8df9aea2bcdbfcb074d408bdc7136031bc5.zip |
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 <weifeng.voon@intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r-- | drivers/i2c/busses/i2c-designware-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/busses/i2c-designware-core.c index 99b54be6ba73..c6922b806fb7 100644 --- a/drivers/i2c/busses/i2c-designware-core.c +++ b/drivers/i2c/busses/i2c-designware-core.c @@ -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); |