Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1412019

RE: [PATCH] i2c: designware: Enable ioctl I2C_TIMEOUT

From "Voon, Weifeng" <weifeng.voon@intel.com>
Newsgroups linux.kernel
Subject RE: [PATCH] i2c: designware: Enable ioctl I2C_TIMEOUT
Date 2016-06-02 11:20 +0200
Message-ID <rFwXf-450-5@gated-at.bofh.it> (permalink)
References <rFvHR-35T-37@gated-at.bofh.it> <rFwky-3Ay-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> From: Uwe Kleine-König [mailto:u.kleine-koenig@pengutronix.de]
> On Thu, Jun 02, 2016 at 03:57:30PM +0800, Weifeng Voon wrote:
> > This allows applications to set the transfer timeout in 10ms
> > increments via ioctl I2C_TIMEOUT.
> 
> 10ms is only correct with HZ=100. With higher values of HZ you get a finer
> resolution. I'd write:
> 
> 	Respect the transfer timeout set via the I2C_TIMEOUT ioctl.
> 

10ms is correct and regardless of HZ. 
From i2c-dev.c:
client->adapter->timeout = msecs_to_jiffies(arg * 10);

The purpose of putting in the resolution of 10ms is just for the ease of others when
they are using this patch. I am ok to take it out if it is not necessary.

> and not mention the resolution at all. After all your patch doesn't "enable" that
> ioctl, just makes use of the value set by it.

Yes, you are right. I am just using the value set by it. Maybe this may sounds more 
relevant:
	Set transfer timeout via ioctl I2C_TIMEOUT 

Or any other recommendation?

> 
> Best regards
> Uwe
> 
> 
> --
> Pengutronix e.K.                           | Uwe Kleine-König            |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] i2c: designware: Enable ioctl I2C_TIMEOUT Weifeng Voon <weifeng.voon@intel.com> - 2016-06-02 10:00 +0200
  Re: [PATCH] i2c: designware: Enable ioctl I2C_TIMEOUT Uwe Kleine-König   <u.kleine-koenig@pengutronix.de> - 2016-06-02 10:40 +0200
    RE: [PATCH] i2c: designware: Enable ioctl I2C_TIMEOUT "Voon, Weifeng" <weifeng.voon@intel.com> - 2016-06-02 11:20 +0200
      Re: [PATCH] i2c: designware: Enable ioctl I2C_TIMEOUT Wolfram Sang <wsa@the-dreams.de> - 2016-06-09 23:00 +0200

csiph-web