]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
authorWolfgang Denk <wd@denx.de>
Tue, 7 Jul 2009 18:54:12 +0000 (20:54 +0200)
committerWolfgang Denk <wd@denx.de>
Tue, 7 Jul 2009 18:54:12 +0000 (20:54 +0200)
drivers/i2c/bfin-twi_i2c.c

index cfe55cd1d2855be150855b5cee0cb35f7a1bd7d0..e7906340799b9072553ff6d15ac9c53526e5dbf0 100644 (file)
@@ -164,7 +164,7 @@ static int i2c_transfer(uchar chip, uint addr, int alen, uchar *buffer, int len,
 
        /* prime the pump */
        if (msg.alen) {
-               len = msg.alen;
+               len = (msg.flags & I2C_M_COMBO) ? msg.alen : msg.alen + len;
                debugi("first byte=0x%02x", *msg.abuf);
                bfin_write_TWI_XMT_DATA8(*(msg.abuf++));
                --msg.alen;
@@ -275,7 +275,7 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
  *     @chip: i2c chip addr
  *     @addr: memory (register) address in the chip
  *     @alen: byte size of address
- *     @buffer: buffer to store data read from chip
+ *     @buffer: buffer holding data to write to chip
  *     @len: how many bytes to write
  *     @return: 0 on success, non-0 on failure
  */