In order to avoid "spurious irq" caused by CP polling mode, enable irq at the entry of i2c_pxa_xfer() fn and disable it again before exit. Also disable it before exiting probe function. Signed-off-by: Jett.Zhou <jtzhou@xxxxxxxxxxx> [vaibhav.hiremath@xxxxxxxxxx: Split & merge patches into logical changes and update the Changelog] Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@xxxxxxxxxx> Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@xxxxxxxxxx> --- drivers/i2c/busses/i2c-pxa.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 3c6ebb5..a3ac97c 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -1163,6 +1163,7 @@ static int i2c_pxa_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num struct pxa_i2c *i2c = adap->algo_data; int ret, i; + enable_irq(i2c->irq); for (i = adap->retries; i >= 0; i--) { ret = i2c_pxa_do_xfer(i2c, msgs, num); if (ret != I2C_RETRY) @@ -1176,6 +1177,7 @@ static int i2c_pxa_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num ret = -EREMOTEIO; out: i2c_pxa_set_slave(i2c, ret); + disable_irq(i2c->irq); return ret; } @@ -1363,6 +1365,8 @@ static int i2c_pxa_probe(struct platform_device *dev) i2c_pxa_reset(i2c); + disable_irq(i2c->irq); + i2c->adap.algo_data = i2c; i2c->adap.dev.parent = &dev->dev; #ifdef CONFIG_OF -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html