diff mbox

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

Message ID 1446029199-11704-4-git-send-email-dirk.eibach@gdsys.cc
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Dirk Eibach Oct. 28, 2015, 10:46 a.m. UTC
From: Dirk Eibach <dirk.eibach@gdsys.cc>

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

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

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

Comments

Heiko Schocher Oct. 28, 2015, 11:24 a.m. UTC | #1
Hello Dirk,

Am 28.10.2015 um 11:46 schrieb dirk.eibach@gdsys.cc:
> From: Dirk Eibach <dirk.eibach@gdsys.cc>
>
> Bus has to be held for repeated start regardless of
> read/write access.
>
> Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
> ---
>
>   drivers/i2c/ihs_i2c.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

As the hole patchserie goes not through the i2c tree:

Acked-by: Heiko Schocher <hs@denx.de>

bye,
Heiko

>
> 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) {
>
Tom Rini Nov. 13, 2015, 1:29 a.m. UTC | #2
On Wed, Oct 28, 2015 at 11:46:24AM +0100, Dirk Eibach wrote:

> From: Dirk Eibach <dirk.eibach@gdsys.cc>
> 
> 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>

Applied to u-boot/master, thanks!
diff mbox

Patch

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) {