Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754800Ab3DTHuS (ORCPT ); Sat, 20 Apr 2013 03:50:18 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:39559 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754565Ab3DTHuP (ORCPT ); Sat, 20 Apr 2013 03:50:15 -0400 X-AuditID: cbfee68e-b7f946d000001e37-51-51724889dd6e Date: Sat, 20 Apr 2013 07:49:29 +0000 (GMT) From: EUNBONG SONG Subject: Re: Re: Re: [PATCH] I2C: Change the value of octeon i2c adapter timeout value To: Wolfram Sang Cc: "linux-i2c@vger.kernel.org" , "linux-kernel@vger.kernel.org" Reply-to: eunb.song@samsung.com MIME-version: 1.0 X-MTR: 20130420074109857@eunb.song Msgkey: 20130420074109857@eunb.song X-EPLocale: ko_KR.euc-kr X-Priority: 3 X-EPWebmail-Msg-Type: personal X-EPWebmail-Reply-Demand: 0 X-EPApproval-Locale: X-EPHeader: ML X-EPTrCode: X-EPTrName: X-MLAttribute: X-RootMTR: 20130420074109857@eunb.song X-ParentMTR: X-ArchiveUser: X-CPGSPASS: N Content-type: text/plain; charset=euc-kr MIME-version: 1.0 Message-id: <11281802.80061366444168759.JavaMail.weblogic@epml02> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupjleLIzCtJLcpLzFFi42I5/e+Zlm6nR1GgQccFa4vLu+awOTB6fN4k F8AYxWWTkpqTWZZapG+XwJXxYccc9oIfPBUfZjg1MJ7g6WLk5BASUJFo+f+dEcSWEDCRmNfz mxnCFpO4cG89WxcjF1DNMkaJlq55LDBFy+ZMYodIzGeU2NXcBtbBIqAqcftiGzuIzSagLfH2 ywNWEFtYIFxiyv6XYLaIgJrEodu9TCA2s0CNxOXt1xkhrpCXmHz6Mlgvr4CgxMmZT6CWKUms a9nPCBFXlpg+4TsTRFxCYtb0C6wQNq/EjPanUPVyEtO+roH6QFri/KwNjDDfLP7+GCrOL3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z0LSjqxmASPLKkbR1ILkguKk9AojveLE3OLSvHS95PzcTYzgBPVs0Q7Gf+etDzEKcDAq 8fB6xBUGCrEmlhVX5h5ilOBgVhLhfWFbFCjEm5JYWZValB9fVJqTWnyIMRkYgROZpUST84HJ M68k3tDYwNjQ0NLcwNTQyII0YSVx3met1oFCAumJJanZqakFqUUwW5g4OKUaGA9fLlrB8SaW 9ce/V47Nkvd2nC9ndnzWvCxkxxqNvB+yS5pZYxsnKO+xKl1ySP+nXtcey+yrv//U3es0cBHN O2A9VT/r/HU7XUnln9m204qqvpolHI++q+e5Xso2+FJfbOvW7LmvGlaE3thQlJg63917+pHj HztE2j2deCbdeP/u8r+EivW5JUosxRmJhlrMRcWJAEBLvL6UAwAA DLP-Filter: Pass X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id r3K7oPVZ028824 Content-Length: 1333 Lines: 34 > > 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?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?