From mboxrd@z Thu Jan 1 00:00:00 1970 From: vaibhav.hiremath@linaro.org (Vaibhav Hiremath) Date: Mon, 15 Jun 2015 21:19:50 +0530 Subject: [PATCH-V2 03/12] i2c: pxa: Return I2C_RETRY when timeout in pio mode In-Reply-To: <1434383399-2370-1-git-send-email-vaibhav.hiremath@linaro.org> References: <1434383399-2370-1-git-send-email-vaibhav.hiremath@linaro.org> Message-ID: <1434383399-2370-4-git-send-email-vaibhav.hiremath@linaro.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org From: Shouming Wang 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 at linaro.org: Updated changelog] Signed-off-by: Vaibhav Hiremath --- drivers/i2c/busses/i2c-pxa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 023e59f..632008f 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; } -- 1.9.1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vaibhav Hiremath Subject: [PATCH-V2 03/12] i2c: pxa: Return I2C_RETRY when timeout in pio mode Date: Mon, 15 Jun 2015 21:19:50 +0530 Message-ID: <1434383399-2370-4-git-send-email-vaibhav.hiremath@linaro.org> References: <1434383399-2370-1-git-send-email-vaibhav.hiremath@linaro.org> Return-path: In-Reply-To: <1434383399-2370-1-git-send-email-vaibhav.hiremath-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org, robert.jarzmik-GANU6spQydw@public.gmane.org, Shouming Wang , Vaibhav Hiremath List-Id: linux-i2c@vger.kernel.org From: Shouming Wang 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-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org: Updated changelog] Signed-off-by: Vaibhav Hiremath --- drivers/i2c/busses/i2c-pxa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 023e59f..632008f 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; } -- 1.9.1