* [PATCH v3] i2c: designware: Use transfer timeout from ioctl I2C_TIMEOUT
@ 2016-06-17 1:46 Weifeng Voon
2016-06-17 5:36 ` Jarkko Nikula
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Weifeng Voon @ 2016-06-17 1:46 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.
Signed-off-by: Weifeng Voon <weifeng.voon@intel.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);
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3] i2c: designware: Use transfer timeout from ioctl I2C_TIMEOUT
2016-06-17 1:46 [PATCH v3] i2c: designware: Use transfer timeout from ioctl I2C_TIMEOUT Weifeng Voon
@ 2016-06-17 5:36 ` Jarkko Nikula
2016-06-17 7:15 ` Uwe Kleine-König
2016-06-19 16:54 ` Wolfram Sang
2 siblings, 0 replies; 4+ messages in thread
From: Jarkko Nikula @ 2016-06-17 5:36 UTC (permalink / raw)
To: Weifeng Voon, Wolfram Sang
Cc: linux-i2c, linux-kernel, Andy Shevchenko, jui.nee.tan
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@intel.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@linux.intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] i2c: designware: Use transfer timeout from ioctl I2C_TIMEOUT
2016-06-17 1:46 [PATCH v3] i2c: designware: Use transfer timeout from ioctl I2C_TIMEOUT Weifeng Voon
2016-06-17 5:36 ` Jarkko Nikula
@ 2016-06-17 7:15 ` Uwe Kleine-König
2016-06-19 16:54 ` Wolfram Sang
2 siblings, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2016-06-17 7:15 UTC (permalink / raw)
To: Weifeng Voon
Cc: Wolfram Sang, Jarkko Nikula, linux-i2c, linux-kernel,
Andy Shevchenko, jui.nee.tan
On Fri, Jun 17, 2016 at 09:46:35AM +0800, 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@intel.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] i2c: designware: Use transfer timeout from ioctl I2C_TIMEOUT
2016-06-17 1:46 [PATCH v3] i2c: designware: Use transfer timeout from ioctl I2C_TIMEOUT Weifeng Voon
2016-06-17 5:36 ` Jarkko Nikula
2016-06-17 7:15 ` Uwe Kleine-König
@ 2016-06-19 16:54 ` Wolfram Sang
2 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2016-06-19 16:54 UTC (permalink / raw)
To: Weifeng Voon
Cc: Jarkko Nikula, linux-i2c, linux-kernel, Andy Shevchenko, jui.nee.tan
[-- Attachment #1: Type: text/plain, Size: 258 bytes --]
On Fri, Jun 17, 2016 at 09:46:35AM +0800, 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@intel.com>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-19 16:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-17 1:46 [PATCH v3] i2c: designware: Use transfer timeout from ioctl I2C_TIMEOUT Weifeng Voon
2016-06-17 5:36 ` Jarkko Nikula
2016-06-17 7:15 ` Uwe Kleine-König
2016-06-19 16:54 ` Wolfram Sang
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).