linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] i2c: designware: Use transfer timeout from ioctl I2C_TIMEOUT
@ 2016-06-15  8:55 Weifeng Voon
  2016-06-15 13:50 ` Jarkko Nikula
  0 siblings, 1 reply; 2+ messages in thread
From: Weifeng Voon @ 2016-06-15  8:55 UTC (permalink / raw)
  To: Wolfram Sang, Jarkko Nikula
  Cc: linux-i2c, linux-kernel, Andy Shevchenko, jui.nee.tan, Weifeng Voon

This allows applications to set the transfer timeout in 10ms increments via
ioctl I2C_TIMEOUT.

changelog v2:
* No code change, just change to a more suitable title

Signed-off-by: Weifeng Voon <weifeng.voon@intel.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 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);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] i2c: designware: Use transfer timeout from ioctl I2C_TIMEOUT
  2016-06-15  8:55 [PATCH v2] i2c: designware: Use transfer timeout from ioctl I2C_TIMEOUT Weifeng Voon
@ 2016-06-15 13:50 ` Jarkko Nikula
  0 siblings, 0 replies; 2+ messages in thread
From: Jarkko Nikula @ 2016-06-15 13:50 UTC (permalink / raw)
  To: Weifeng Voon, Wolfram Sang
  Cc: linux-i2c, linux-kernel, Andy Shevchenko, jui.nee.tan

On 06/15/2016 11:55 AM, Weifeng Voon wrote:
> This allows applications to set the transfer timeout in 10ms increments via
> ioctl I2C_TIMEOUT.
>
> changelog v2:
> * No code change, just change to a more suitable title
>
> Signed-off-by: Weifeng Voon <weifeng.voon@intel.com>
> ---
>  drivers/i2c/busses/i2c-designware-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
Actually changelog doesn't belong to commit log. Otherwise

Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-15 13:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-15  8:55 [PATCH v2] i2c: designware: Use transfer timeout from ioctl I2C_TIMEOUT Weifeng Voon
2016-06-15 13:50 ` Jarkko Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).