From: Shouming Wang Date: Tue, 14 Jul 2015 07:36:42 +0000 (+0530) Subject: i2c: pxa: Return I2C_RETRY when timeout in pio mode X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8bd75bd3038df5e743c7daa84c2d34d13493b395;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git i2c: pxa: Return I2C_RETRY when timeout in pio mode In case of timeout in pio mode of operation return I2C_RETRY. This behavior will be same as interrupt mode of operation. Signed-off-by: Shouming Wang [vaibhav.hiremath@linaro.org: Updated changelog] Signed-off-by: Vaibhav Hiremath Acked-by: Robert Jarzmik Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 023e59fda650..632008f24098 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -745,8 +745,10 @@ static int i2c_pxa_do_pio_xfer(struct pxa_i2c *i2c, ret = i2c->msg_idx; out: - if (timeout == 0) + if (timeout == 0) { i2c_pxa_scream_blue_murder(i2c, "timeout"); + ret = I2C_RETRY; + } return ret; }