From 82d716fd0d057db300cf2b1ab59194858f9b2e6d Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 12 Mar 2006 01:30:45 +0100 Subject: Fix comment in common/soft_i2c.c Patches by Peter Korsgaard/Tolunay Orkun, 26 May 2005 --- common/soft_i2c.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'common/soft_i2c.c') diff --git a/common/soft_i2c.c b/common/soft_i2c.c index 3d0e08c6ff3..268da2cdc44 100644 --- a/common/soft_i2c.c +++ b/common/soft_i2c.c @@ -288,7 +288,10 @@ int i2c_probe(uchar addr) { int rc; - /* perform 1 byte read transaction */ + /* + * perform 1 byte write transaction with just address byte + * (fake write) + */ send_start(); rc = write_byte ((addr << 1) | 0); send_stop(); -- cgit v1.2.3 From 8e7b703a62783f0e88d3a7e4b1dd1c033bc95ec8 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 12 Mar 2006 02:55:22 +0100 Subject: Coding Style cleanup --- common/soft_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/soft_i2c.c') diff --git a/common/soft_i2c.c b/common/soft_i2c.c index 268da2cdc44..48e3d3e1c26 100644 --- a/common/soft_i2c.c +++ b/common/soft_i2c.c @@ -289,7 +289,7 @@ int i2c_probe(uchar addr) int rc; /* - * perform 1 byte write transaction with just address byte + * perform 1 byte write transaction with just address byte * (fake write) */ send_start(); -- cgit v1.2.3 From c15f80eaefa7ece72272e6f441f0ed36eab14411 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Mon, 13 Mar 2006 00:50:48 +0100 Subject: Change the sequence of events in soft_i2c.c:send_ack() to keep from incorrectly generating start/stop conditions on the bus. Patch by Andrew Dyer, 26 Jul 2005 --- common/soft_i2c.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'common/soft_i2c.c') diff --git a/common/soft_i2c.c b/common/soft_i2c.c index 48e3d3e1c26..b3642dafc24 100644 --- a/common/soft_i2c.c +++ b/common/soft_i2c.c @@ -164,13 +164,10 @@ static void send_ack(int ack) volatile immap_t *immr = (immap_t *)CFG_IMMR; #endif - I2C_ACTIVE; I2C_SCL(0); I2C_DELAY; - - I2C_SDA(ack); - I2C_ACTIVE; + I2C_SDA(ack); I2C_DELAY; I2C_SCL(1); I2C_DELAY; -- cgit v1.2.3