From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Fri, 04 Sep 2009 13:39:26 -0500 Subject: [U-Boot] Odd value for I2C_TIMEOUT in fsl_i2c.c In-Reply-To: <20090904183024.67AAA832E8DE@gemini.denx.de> References: <4A9FDF1E.4090908@freescale.com> <4AA0BEC5.3010505@denx.de> <20090904092503.058A0832E8DE@gemini.denx.de> <20090904150135.E88CB832E8DE@gemini.denx.de> <4AA12E52.2080403@freescale.com> <1252078092.6005.63.camel@localhost.localdomain> <4AA132B3.3050004@freescale.com> <20090904183024.67AAA832E8DE@gemini.denx.de> Message-ID: <4AA15EDE.6080706@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: > Probably not. If you place a read request to a slow device it may > take tens of milliseconds, or even longer - I have no idea. IIRC we > had a box with a LCD display connected over I2C, which didn't ent > into production as originally designed because writing the content > took over 100 millisec. Well, that's an extreme case that is board-specific. Perhaps I should do this: #ifndef CONFIG_I2C_TIMEOUT #define CONFIG_I2C_TIMEOUT 1000 #endif Keep in mind that so far, the number 250 has been good enough for every board to date. Why my current board is happier with 500 is a mystery to me. Also, should we be using the same value for the timeout in i2c_wait4bus() and i2c_wait()? It looks like i2c_wait() should have a much shorter timeout than i2c_wait4bus()? -- Timur Tabi Linux kernel developer at Freescale