Commit b73a9aec authored by Troy Kisky's avatar Troy Kisky Committed by Jean Delvare

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: default avatarTroy Kisky <troy.kisky@boundarydevices.com>
Acked-by: default avatarDirk Behme <dirk.behme@gmail.com>
Signed-off-by: default avatarKevin Hilman <khilman@mvista.com>
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent 852fb2ac
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment