diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-07-13 10:02:12 +0200 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-07-13 10:02:12 +0200 |
commit | 4af358f81881e1d083a916c9269b5ac0936e180d (patch) | |
tree | c0533d3268daccb6f06f1180aa1ae8f1aac17d36 /drivers/i2c/busses/i2c-bfin-twi.c | |
parent | drivers/video: use strings to specify the Freescale DIU monitor port (diff) | |
parent | drivers/video/udlfb match class, subclass, and protocol (diff) | |
download | linux-4af358f81881e1d083a916c9269b5ac0936e180d.tar.xz linux-4af358f81881e1d083a916c9269b5ac0936e180d.zip |
Merge branch 'fbdev/stable-updates'
Diffstat (limited to 'drivers/i2c/busses/i2c-bfin-twi.c')
-rw-r--r-- | drivers/i2c/busses/i2c-bfin-twi.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c index 52b545a795f2..cbc98aea5b09 100644 --- a/drivers/i2c/busses/i2c-bfin-twi.c +++ b/drivers/i2c/busses/i2c-bfin-twi.c @@ -193,7 +193,13 @@ static void bfin_twi_handle_interrupt(struct bfin_twi_iface *iface, return; } if (twi_int_status & MCOMP) { - if (iface->cur_mode == TWI_I2C_MODE_COMBINED) { + if ((read_MASTER_CTL(iface) & MEN) == 0 && + (iface->cur_mode == TWI_I2C_MODE_REPEAT || + iface->cur_mode == TWI_I2C_MODE_COMBINED)) { + iface->result = -1; + write_INT_MASK(iface, 0); + write_MASTER_CTL(iface, 0); + } else if (iface->cur_mode == TWI_I2C_MODE_COMBINED) { if (iface->readNum == 0) { /* set the read number to 1 and ask for manual * stop in block combine mode |