mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-22 01:10:28 +00:00
i2c-davinci: Fix lost interrupt
DAVINCI_I2C_STR_REG is a write 1 to clear register, so don't use a read/modify/write cycle. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Acked-by: Dirk Behme <dirk.behme@gmail.com> Signed-off-by: Kevin Hilman <khilman@mvista.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
This commit is contained in:
parent
852fb2ac76
commit
b73a9aece5
@ -382,9 +382,8 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id)
|
||||
break;
|
||||
|
||||
case DAVINCI_I2C_IVR_ARDY:
|
||||
w = davinci_i2c_read_reg(dev, DAVINCI_I2C_STR_REG);
|
||||
MOD_REG_BIT(w, DAVINCI_I2C_STR_ARDY, 1);
|
||||
davinci_i2c_write_reg(dev, DAVINCI_I2C_STR_REG, w);
|
||||
davinci_i2c_write_reg(dev,
|
||||
DAVINCI_I2C_STR_REG, DAVINCI_I2C_STR_ARDY);
|
||||
complete(&dev->cmd_complete);
|
||||
break;
|
||||
|
||||
@ -397,12 +396,9 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id)
|
||||
if (dev->buf_len)
|
||||
continue;
|
||||
|
||||
w = davinci_i2c_read_reg(dev,
|
||||
DAVINCI_I2C_STR_REG);
|
||||
MOD_REG_BIT(w, DAVINCI_I2C_IMR_RRDY, 0);
|
||||
davinci_i2c_write_reg(dev,
|
||||
DAVINCI_I2C_STR_REG,
|
||||
w);
|
||||
DAVINCI_I2C_STR_REG,
|
||||
DAVINCI_I2C_IMR_RRDY);
|
||||
} else
|
||||
dev_err(dev->dev, "RDR IRQ while no "
|
||||
"data requested\n");
|
||||
@ -428,9 +424,8 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id)
|
||||
break;
|
||||
|
||||
case DAVINCI_I2C_IVR_SCD:
|
||||
w = davinci_i2c_read_reg(dev, DAVINCI_I2C_STR_REG);
|
||||
MOD_REG_BIT(w, DAVINCI_I2C_STR_SCD, 1);
|
||||
davinci_i2c_write_reg(dev, DAVINCI_I2C_STR_REG, w);
|
||||
davinci_i2c_write_reg(dev,
|
||||
DAVINCI_I2C_STR_REG, DAVINCI_I2C_STR_SCD);
|
||||
complete(&dev->cmd_complete);
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user