]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
i2c: ihs_i2c: Fix hold_bus control
authorDirk Eibach <dirk.eibach@gdsys.cc>
Wed, 28 Oct 2015 10:46:24 +0000 (11:46 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 12 Nov 2015 20:59:02 +0000 (15:59 -0500)
Bus has to be held for repeated start regardless of
read/write access.

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Acked-by: Heiko Schocher <hs@denx.de>
drivers/i2c/ihs_i2c.c

index e0014590b5d4f875e69f61010bec0dbbdc8682e2..b05c15f8cb0bd197dddee11b3b6f0c06d8e29f67 100644 (file)
@@ -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) {