Skip to content

Commit 14718b3

Browse files
robertfosswsakernel
authored andcommitted
i2c: qcom: Fix IRQ error misassignement
During cci_isr() errors read from register fields belonging to i2c master1 are currently assigned to the status field belonging to i2c master0. This patch corrects this error, and always assigns master1 errors to the status field of master1. Fixes: e517526 ("i2c: Add Qualcomm CCI I2C driver") Reported-by: Loic Poulain <loic.poulain@linaro.org> Suggested-by: Loic Poulain <loic.poulain@linaro.org> Signed-off-by: Robert Foss <robert.foss@linaro.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Wolfram Sang <wsa@kernel.org>
1 parent e9acf02 commit 14718b3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/i2c/busses/i2c-qcom-cci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ static irqreturn_t cci_isr(int irq, void *dev)
194194
if (unlikely(val & CCI_IRQ_STATUS_0_I2C_M1_ERROR)) {
195195
if (val & CCI_IRQ_STATUS_0_I2C_M1_Q0_NACK_ERR ||
196196
val & CCI_IRQ_STATUS_0_I2C_M1_Q1_NACK_ERR)
197-
cci->master[0].status = -ENXIO;
197+
cci->master[1].status = -ENXIO;
198198
else
199-
cci->master[0].status = -EIO;
199+
cci->master[1].status = -EIO;
200200

201201
writel(CCI_HALT_REQ_I2C_M1_Q0Q1, cci->base + CCI_HALT_REQ);
202202
ret = IRQ_HANDLED;

0 commit comments

Comments
 (0)