Re: Re: Re: Re: [PATCH] I2C: Change the value of octeon i2c adapter timeout value

2013-04-23 Thread EUNBONG SONG


Sender : Wolfram Sang
Date : 2013-04-24 01:27 (GMT+09:00)
Title : Re: Re: Re: [PATCH] I2C: Change the value of octeon i2c adapter timeout 
value

> 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.

Yes, i will check your commit message and use for reference for the next-time.
Thanks.

Re: Re: Re: [PATCH] I2C: Change the value of octeon i2c adapter timeout value

2013-04-23 Thread Wolfram Sang
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.

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Re: Re: [PATCH] I2C: Change the value of octeon i2c adapter timeout value

2013-04-20 Thread EUNBONG SONG

> 
> 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 += 100;
+   end.tv_sec--;
+   }

+if(result > 0)
+printk("octeon_i2c_wait elapse time: %ld msecs\n", (end.tv_sec 
- start.tv_sec)*100 + (end.tv_usec - start.tv_usec));
+else
+printk("octeon_i2c_wait fail!!\n");
}N떑꿩�r툤y鉉싕b쾊Ф푤v�^�)頻{.n�+돴쪐{콏g"왲^n뇊⊆쫧�곷h솳鈺�&��췍쳺�h�(��쉸듶줷"얎�m��곴�z받뻿筬f"톒쉱�~늤

Re: Re: [PATCH] I2C: Change the value of octeon i2c adapter timeout value

2013-04-19 Thread Wolfram Sang
On Fri, Apr 19, 2013 at 09:13:54AM +, EUNBONG SONG wrote:
> 
> 
> On Fri, Apr 19, 2013 at 12:01:04AM +, EUNBONG SONG wrote:
> >> 
> >>  I think HZ/50 is better than 2 for adapter timeout.
> 
> > Basically OK. But why HZ/50? Most drivers use HZ.
> 
> Actually, I just translated 2 jiffies because HZ is 100 in default cavium 
> config. 
> You can find that in "arch/mips/configs/cavium_octeon_defconfig". 
> And i have been using this value over 1 year in octeon board without problem.

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.

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Re: [PATCH] I2C: Change the value of octeon i2c adapter timeout value

2013-04-19 Thread EUNBONG SONG


On Fri, Apr 19, 2013 at 12:01:04AM +, EUNBONG SONG wrote:
>> 
>>  I think HZ/50 is better than 2 for adapter timeout.

> Basically OK. But why HZ/50? Most drivers use HZ.

Actually, I just translated 2 jiffies because HZ is 100 in default cavium 
config. 
You can find that in "arch/mips/configs/cavium_octeon_defconfig". 
And i have been using this value over 1 year in octeon board without problem.
Thanks.