Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193172
b: refs/heads/master
c: f0ac131
h: refs/heads/master
v: v3
  • Loading branch information
Sonic Zhang authored and Ben Dooks committed May 19, 2010
1 parent 0c2d91f commit bd57f03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: be2f80f0a3a333c0c00b2c8a7c2d74fcd66b75a2
refs/heads/master: f0ac131a21ed13e8baaa9df6f0420f2c4b45e807
18 changes: 7 additions & 11 deletions trunk/drivers/i2c/busses/i2c-bfin-twi.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,18 +159,14 @@ static void bfin_twi_handle_interrupt(struct bfin_twi_iface *iface,
if (mast_stat & BUFWRERR)
dev_dbg(&iface->adap.dev, "Buffer Write Error\n");

/* if both err and complete int stats are set, return proper
* results.
/* If it is a quick transfer, only address without data,
* not an err, return 1.
*/
if (twi_int_status & MCOMP) {
/* If it is a quick transfer, only address without data,
* not an err, return 1.
* If address is acknowledged return 1.
*/
if ((iface->writeNum == 0 && (mast_stat & BUFRDERR))
|| !(mast_stat & ANAK))
iface->result = 1;
}
if (iface->cur_mode == TWI_I2C_MODE_STANDARD &&
iface->transPtr == NULL &&
(twi_int_status & MCOMP) && (mast_stat & DNAK))
iface->result = 1;

complete(&iface->complete);
return;
}
Expand Down

0 comments on commit bd57f03

Please sign in to comment.