ACK: [PATCH 1/1 SRU Xenial] i2c: designware: Use transfer timeout from ioctl I2C_TIMEOUT

Stefan Bader stefan.bader at canonical.com
Wed Sep 27 18:33:07 UTC 2017


On 21.09.2017 01:03, Kai-Heng Feng wrote:
> From: Weifeng Voon <weifeng.voon at intel.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1718578
> 
> This allows applications to set the transfer timeout in 10ms increments via
> ioctl I2C_TIMEOUT.
> 
> Signed-off-by: Weifeng Voon <weifeng.voon at intel.com>
> Acked-by: Jarkko Nikula <jarkko.nikula at linux.intel.com>
> Acked-by: Uwe Kleine-K├Ânig <u.kleine-koenig at pengutronix.de>
> Signed-off-by: Wolfram Sang <wsa at the-dreams.de>
> (cherry picked from commit d0bcd8df9aea2bcdbfcb074d408bdc7136031bc5)
> Signed-off-by: Kai-Heng Feng <kai.heng.feng at canonical.com>
Acked-by: Stefan Bader <stefan.bader at canonical.com>

> ---
>  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 6974a99034c3..c331340f3bcc 100644
> --- a/drivers/i2c/busses/i2c-designware-core.c
> +++ b/drivers/i2c/busses/i2c-designware-core.c
> @@ -664,7 +664,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);
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20170927/8d0234eb/attachment.sig>


More information about the kernel-team mailing list