Re: [PATCH] mfd: ti_am335x_tscadc: fix spin lock and reg_cache

2013-10-25 Thread Zubair Lutfullah :
On Tue, Oct 22, 2013 at 06:28:13PM +0200, Sebastian Andrzej Siewior wrote: > On 10/22/2013 05:48 PM, Lee Jones wrote: > > On Tue, 22 Oct 2013, Sebastian Andrzej Siewior wrote: > > > >> On 08/07/2013 10:40 AM, Lee Jones wrote: > >>> On Mon, 05 Aug 2013, Zubair Lutfullah wrote: > >>> > Reg_cach

Re: [PATCH] mfd: ti_am335x_tscadc: fix spin lock and reg_cache

2013-10-22 Thread Lee Jones
On Tue, 22 Oct 2013, Sebastian Andrzej Siewior wrote: > On 10/22/2013 07:06 PM, Lee Jones wrote: > > Hmm.. I'm starting to see what you mean. > > > > So what's the point of the read before write then? > > > > Why don't you use the cache all of the time? > > I'm waiting for Zabair for this. The

Re: [PATCH] mfd: ti_am335x_tscadc: fix spin lock and reg_cache

2013-10-22 Thread Sebastian Andrzej Siewior
On 10/22/2013 07:06 PM, Lee Jones wrote: > Hmm.. I'm starting to see what you mean. > > So what's the point of the read before write then? > > Why don't you use the cache all of the time? I'm waiting for Zabair for this. The last thing he said is that he is going to have a wedding which might in

Re: [PATCH] mfd: ti_am335x_tscadc: fix spin lock and reg_cache

2013-10-22 Thread Lee Jones
On Tue, 22 Oct 2013, Sebastian Andrzej Siewior wrote: > On 10/22/2013 06:05 PM, Lee Jones wrote: > >> I added reg_se_cache to cache the content of REG_SE once and > >> synchronize it among TSC & ADC access. REG_SE is set to 0 by the HW > >> after "work" has been done. So you need to know the old v

Re: [PATCH] mfd: ti_am335x_tscadc: fix spin lock and reg_cache

2013-10-22 Thread Sebastian Andrzej Siewior
On 10/22/2013 06:05 PM, Lee Jones wrote: >> I added reg_se_cache to cache the content of REG_SE once and >> synchronize it among TSC & ADC access. REG_SE is set to 0 by the HW >> after "work" has been done. So you need to know the old value or TSC may >> disable ADC and the other way around. > > Y

Re: [PATCH] mfd: ti_am335x_tscadc: fix spin lock and reg_cache

2013-10-22 Thread Sebastian Andrzej Siewior
On 10/22/2013 05:48 PM, Lee Jones wrote: > On Tue, 22 Oct 2013, Sebastian Andrzej Siewior wrote: > >> On 08/07/2013 10:40 AM, Lee Jones wrote: >>> On Mon, 05 Aug 2013, Zubair Lutfullah wrote: >>> Reg_cache variable is used to lock step enable register from being accessed and written by b

Re: [PATCH] mfd: ti_am335x_tscadc: fix spin lock and reg_cache

2013-10-22 Thread Lee Jones
On Tue, 22 Oct 2013, Sebastian Andrzej Siewior wrote: > On 08/07/2013 10:40 AM, Lee Jones wrote: > > On Mon, 05 Aug 2013, Zubair Lutfullah wrote: > > > >> Reg_cache variable is used to lock step enable register > >> from being accessed and written by both TSC and ADC > >> at the same time. > >> H

Re: [PATCH] mfd: ti_am335x_tscadc: fix spin lock and reg_cache

2013-10-22 Thread Lee Jones
On Tue, 22 Oct 2013, Sebastian Andrzej Siewior wrote: > On 08/07/2013 10:40 AM, Lee Jones wrote: > > On Mon, 05 Aug 2013, Zubair Lutfullah wrote: > > > >> Reg_cache variable is used to lock step enable register > >> from being accessed and written by both TSC and ADC > >> at the same time. > >> H

Re: [PATCH] mfd: ti_am335x_tscadc: fix spin lock and reg_cache

2013-10-22 Thread Sebastian Andrzej Siewior
On 08/07/2013 10:40 AM, Lee Jones wrote: > On Mon, 05 Aug 2013, Zubair Lutfullah wrote: > >> Reg_cache variable is used to lock step enable register >> from being accessed and written by both TSC and ADC >> at the same time. >> However, it isn't updated anywhere in the code at all. >> >> If both T

Re: [PATCH] mfd: ti_am335x_tscadc: fix spin lock and reg_cache

2013-08-07 Thread Lee Jones
On Mon, 05 Aug 2013, Zubair Lutfullah wrote: > Reg_cache variable is used to lock step enable register > from being accessed and written by both TSC and ADC > at the same time. > However, it isn't updated anywhere in the code at all. > > If both TSC and ADC are used, eventually 1 is always >