[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52b627ca-93b6-5c67-7d00-cf4c962ab5df@linux.intel.com>
Date: Fri, 17 Jun 2016 08:36:42 +0300
From: Jarkko Nikula <jarkko.nikula@...ux.intel.com>
To: Weifeng Voon <weifeng.voon@...el.com>,
Wolfram Sang <wsa@...-dreams.de>
Cc: linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
jui.nee.tan@...el.com
Subject: Re: [PATCH v3] i2c: designware: Use transfer timeout from ioctl
I2C_TIMEOUT
On 06/17/2016 04:46 AM, Weifeng Voon wrote:
> This allows applications to set the transfer timeout in 10ms increments via
> ioctl I2C_TIMEOUT.
>
> Signed-off-by: Weifeng Voon <weifeng.voon@...el.com>
> ---
> changelog v2:
> * No code change, just change to a more suitable title
>
> changelog v3:
> * Move changelog out of commit log
>
> drivers/i2c/busses/i2c-designware-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/busses/i2c-designware-core.c
> index 99b54be..c6922b8 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);
Acked-by: Jarkko Nikula <jarkko.nikula@...ux.intel.com>
Powered by blists - more mailing lists