public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] i2c: fix SDA contention in read_byte()
@ 2010-07-06  6:14 Thomas Chou
  2010-07-07  4:45 ` Andrew Dyer
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Chou @ 2010-07-06  6:14 UTC (permalink / raw)
  To: u-boot

We should not set SDA after TRISTATE, as it results in contention.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
---
 drivers/i2c/soft_i2c.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c
index 847db76..344b7f8 100644
--- a/drivers/i2c/soft_i2c.c
+++ b/drivers/i2c/soft_i2c.c
@@ -305,8 +305,8 @@ static uchar read_byte(int ack)
 	/*
 	 * Read 8 bits, MSB first.
 	 */
-	I2C_TRISTATE;
 	I2C_SDA(1);
+	I2C_TRISTATE;
 	data = 0;
 	for(j = 0; j < 8; j++) {
 		I2C_SCL(0);
-- 
1.7.1

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

end of thread, other threads:[~2010-07-22  2:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-06  6:14 [U-Boot] [PATCH] i2c: fix SDA contention in read_byte() Thomas Chou
2010-07-07  4:45 ` Andrew Dyer
2010-07-07  5:00   ` Reinhard Meyer
2010-07-12  4:14     ` Thomas Chou
2010-07-12  5:00       ` Reinhard Meyer
2010-07-12  5:51         ` Thomas Chou
2010-07-12  6:49           ` Reinhard Meyer
2010-07-14  1:29             ` Thomas Chou
2010-07-14  6:31               ` Reinhard Meyer
2010-07-21 17:40       ` Mike Frysinger
2010-07-22  2:47         ` Thomas Chou
2010-07-11 22:55   ` Mike Frysinger
2010-07-12  3:47     ` Andrew Dyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox