[U-Boot] [PATCH v1 03/18] i2c: ihs_i2c: Fix hold_bus control

dirk.eibach at gdsys.cc dirk.eibach at gdsys.cc
Wed Oct 28 11:46:24 CET 2015


From: Dirk Eibach <dirk.eibach at gdsys.cc>

Bus has to be held for repeated start regardless of
read/write access.

Signed-off-by: Dirk Eibach <dirk.eibach at gdsys.cc>
---

 drivers/i2c/ihs_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/ihs_i2c.c b/drivers/i2c/ihs_i2c.c
index e001459..b05c15f 100644
--- a/drivers/i2c/ihs_i2c.c
+++ b/drivers/i2c/ihs_i2c.c
@@ -135,7 +135,7 @@ static int ihs_i2c_access(struct i2c_adapter *adap, uchar chip, uint addr,
 	if (len <= 0)
 		return 1;
 
-	if (ihs_i2c_address(chip, addr, alen, !read))
+	if (ihs_i2c_address(chip, addr, alen, len))
 		return 1;
 
 	while (len) {
-- 
2.1.3



More information about the U-Boot mailing list