Re: [PATCH V7 1/2] i2c/adapter: Add bus recovery infrastructure

2012-11-30 Thread Wolfram Sang
On Tue, Nov 27, 2012 at 11:19:09AM +0530, Viresh Kumar wrote: > On 27 November 2012 01:50, Uwe Kleine-König > wrote: > > In reply to a more detailed problem report that should be addressed by > > this series on spear-devel I asked a few questions to rule out 6/ and > > 7/. I cannot find it in an p

Re: [PATCH V7 1/2] i2c/adapter: Add bus recovery infrastructure

2012-11-26 Thread Viresh Kumar
On 27 November 2012 01:50, Uwe Kleine-König wrote: > In reply to a more detailed problem report that should be addressed by > this series on spear-devel I asked a few questions to rule out 6/ and > 7/. I cannot find it in an public accessible archive though. It's about > a sta529 codec. When switc

Re: [PATCH V7 1/2] i2c/adapter: Add bus recovery infrastructure

2012-11-26 Thread Paul Carpenter
Uwe Kleine-König wrote: Hello Viresh, On Mon, Nov 26, 2012 at 06:21:25PM +0530, Viresh Kumar wrote: On 26 November 2012 17:15, Paul Carpenter wrote: Unless you know why the bus is stuck, how can you reset reminder this method ONLY works if SCL is high and SDA probably was low and the slave de

Re: [PATCH V7 1/2] i2c/adapter: Add bus recovery infrastructure

2012-11-26 Thread Uwe Kleine-König
Hello Viresh, On Mon, Nov 26, 2012 at 06:21:25PM +0530, Viresh Kumar wrote: > On 26 November 2012 17:15, Paul Carpenter > wrote: > > Unless you know why the bus is stuck, how can you reset reminder this > > method ONLY works if SCL is high and SDA probably was low and the slave > > device is what

Re: [PATCH V7 1/2] i2c/adapter: Add bus recovery infrastructure

2012-11-26 Thread Viresh Kumar
On 26 November 2012 18:58, Paul Carpenter wrote: >>> +ret = gpio_request_one(bri->scl_gpio, GPIOF_OPEN_DRAIN | >>> +GPIOF_OUT_INIT_HIGH, "i2c-scl"); >> >>I always get wary of people driving I2C with non-open-drain, especially >>with stuck busses > > I would want to know what "GPIOF

Re: [PATCH V7 1/2] i2c/adapter: Add bus recovery infrastructure

2012-11-26 Thread Paul Carpenter
Viresh Kumar wrote: On 26 November 2012 17:15, Paul Carpenter wrote: Unless you know why the bus is stuck, how can you reset reminder this method ONLY works if SCL is high and SDA probably was low and the slave Hi Paul, I completely agree with what you said, and i also feel the need of

Re: [PATCH V7 1/2] i2c/adapter: Add bus recovery infrastructure

2012-11-26 Thread Viresh Kumar
On 26 November 2012 17:15, Paul Carpenter wrote: > Unless you know why the bus is stuck, how can you reset reminder this > method ONLY works if SCL is high and SDA probably was low and the slave > device is what is stuck in wrong state. NOTE SCL and SDA high can be > considered as BUS IDLE or havi

Re: [PATCH V7 1/2] i2c/adapter: Add bus recovery infrastructure

2012-11-26 Thread Paul Carpenter
Viresh Kumar wrote: On 25 November 2012 17:22, Paul Carpenter wrote: Viresh Kumar wrote: Add i2c bus recovery infrastructure to i2c adapters as specified in the i2c protocol Rev. 03 section 3.1.16 titled "Bus clear". http://www.nxp.com/documents/user_manual/UM10204.pdf You should also take n

Re: [PATCH V7 1/2] i2c/adapter: Add bus recovery infrastructure

2012-11-25 Thread Viresh Kumar
On 25 November 2012 17:22, Paul Carpenter wrote: > Viresh Kumar wrote: >> Add i2c bus recovery infrastructure to i2c adapters as specified in the >> i2c >> protocol Rev. 03 section 3.1.16 titled "Bus clear". >> >> http://www.nxp.com/documents/user_manual/UM10204.pdf > > You should also take note o

Re: [PATCH V7 1/2] i2c/adapter: Add bus recovery infrastructure

2012-11-25 Thread Paul Carpenter
Viresh Kumar wrote: > Add i2c bus recovery infrastructure to i2c adapters as specified in the i2c > protocol Rev. 03 section 3.1.16 titled "Bus clear". > > http://www.nxp.com/documents/user_manual/UM10204.pdf You should also take note of section 3.1.14 and its notes on Software Reset - "Pre

[PATCH V7 1/2] i2c/adapter: Add bus recovery infrastructure

2012-11-24 Thread Viresh Kumar
Add i2c bus recovery infrastructure to i2c adapters as specified in the i2c protocol Rev. 03 section 3.1.16 titled "Bus clear". http://www.nxp.com/documents/user_manual/UM10204.pdf Sometimes during operation i2c bus hangs and we need to give dummy clocks to slave device to start the transfer agai