linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Re: Re: [PATCH]  I2C: Change the value of octeon i2c adapter timeout value
@ 2013-04-20  7:49 EUNBONG SONG
  2013-04-23 16:27 ` Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: EUNBONG SONG @ 2013-04-20  7:49 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=euc-kr, Size: 1333 bytes --]


> 
> Have you been writing to EEPROMS? Their erase/write cycle might be
> longer. But I am not forcing you to change the value, just giving some
> suggestions.

My board has i2c mux, temp sensor, eeprom.  And I added some debugging code for measuring i2c response time as below  and 
run i2c operation for each device. 
The maximum respeonse time was 500usec(under 1msec). So 20 msec is enough for adapter timeout. 
Thanks. 
static int octeon_i2c_wait(struct octeon_i2c *i2c)
{
        int result;
+        struct timeval start, end;

        octeon_i2c_int_enable(i2c);

+        do_gettimeofday(&start);
        result = wait_event_timeout(i2c->queue,
                                          octeon_i2c_test_iflg(i2c),
                                          i2c->adap.timeout);

+        do_gettimeofday(&end);

+        if(end.tv_usec < start.tv_usec){
+               end.tv_usec += 1000000;
+               end.tv_sec--;
+       }

+        if(result > 0)
+                printk("octeon_i2c_wait elapse time: %ld msecs\n", (end.tv_sec - start.tv_sec)*1000000 + (end.tv_usec - start.tv_usec));
+        else
+                printk("octeon_i2c_wait fail!!\n");
}ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re: Re: Re: [PATCH]  I2C: Change the value of octeon i2c adapter timeout value
  2013-04-20  7:49 Re: Re: [PATCH] I2C: Change the value of octeon i2c adapter timeout value EUNBONG SONG
@ 2013-04-23 16:27 ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2013-04-23 16:27 UTC (permalink / raw)
  To: EUNBONG SONG; +Cc: linux-i2c, linux-kernel

Hi,

what mail client do you use? It seems to break message threading on my side :(


> > Have you been writing to EEPROMS? Their erase/write cycle might be
> > longer. But I am not forcing you to change the value, just giving some
> > suggestions.
> 
> My board has i2c mux, temp sensor, eeprom.  And I added some debugging code for measuring i2c response time as below  and 
> run i2c operation for each device. 
> The maximum respeonse time was 500usec(under 1msec). So 20 msec is enough for adapter timeout. 

Well, OK, I don't mind. We can increase it later if needed.

Applied to for-next, thanks! Please have a look later how I changed your
commit messages to see the preferred style.


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

end of thread, other threads:[~2013-04-23 16:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-20  7:49 Re: Re: [PATCH] I2C: Change the value of octeon i2c adapter timeout value EUNBONG SONG
2013-04-23 16:27 ` 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).