Re: [PATCH 06/12] i2c: pxa: Return I2C_RETRY when timeout in pio mode

2015-05-29 Thread Robert Jarzmik
Vaibhav Hiremath vaibhav.hirem...@linaro.org writes:

 From: Shouming Wang wang...@marvell.com

 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 wang...@marvell.com
 [vaibhav.hirem...@linaro.org: Updated changelog]
 Signed-off-by: Vaibhav Hiremath vaibhav.hirem...@linaro.org

 Signed-off-by: Vaibhav Hiremath vaibhav.hirem...@linaro.org
 ---
  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 eb09071..2777d5c 100644
 --- a/drivers/i2c/busses/i2c-pxa.c
 +++ b/drivers/i2c/busses/i2c-pxa.c
 @@ -841,8 +841,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;
 + }
Ok, looks good to me.
As it changes the dynamic behavior of i2c_pxa_pio_xfer(), I'd like to know how
it was tested (on which platform, and what was on the I2C bus).

Cheers.

-- 
Robert
--
To unsubscribe from this list: send the line unsubscribe linux-i2c in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 06/12] i2c: pxa: Return I2C_RETRY when timeout in pio mode

2015-05-29 Thread Vaibhav Hiremath



On Saturday 30 May 2015 02:16 AM, Robert Jarzmik wrote:

Vaibhav Hiremath vaibhav.hirem...@linaro.org writes:


From: Shouming Wang wang...@marvell.com

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 wang...@marvell.com
[vaibhav.hirem...@linaro.org: Updated changelog]
Signed-off-by: Vaibhav Hiremath vaibhav.hirem...@linaro.org

Signed-off-by: Vaibhav Hiremath vaibhav.hirem...@linaro.org
---
  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 eb09071..2777d5c 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -841,8 +841,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;
+   }

Ok, looks good to me.
As it changes the dynamic behavior of i2c_pxa_pio_xfer(), I'd like to know how
it was tested (on which platform, and what was on the I2C bus).



I am testing on PXA1928 based platform, which still not available fully
on Mainline.

I have PMIC 88PM860 connected to I2C bus, with very basic features
enabled. So I do probe/read/write testing.

Having said that, I still did not test RETRY path, to make sure that
RETRY really happens. As I mentioned, everything is under developement,
I just enabled PMIC support on my baseline to validate I2C driver.

Thanks,
Vaibhav
--
To unsubscribe from this list: send the line unsubscribe linux-i2c in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html