From: Dirk Eibach Date: Wed, 28 Oct 2015 10:46:24 +0000 (+0100) Subject: i2c: ihs_i2c: Fix hold_bus control X-Git-Tag: v2016.01-rc1~32 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=457491565b7d33b73829d911976f87027f450daf;p=u-boot i2c: ihs_i2c: Fix hold_bus control Bus has to be held for repeated start regardless of read/write access. Signed-off-by: Dirk Eibach Acked-by: Heiko Schocher --- diff --git a/drivers/i2c/ihs_i2c.c b/drivers/i2c/ihs_i2c.c index e0014590b5..b05c15f8cb 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) {