Race condition in TPA6130A2 (Was: Re: Nokia N900 - audio TPA6130A2 problems)

2016-04-01 Thread Pali Rohár
On Wednesday 16 March 2016 15:47:10 Sebastian Reichel wrote: > I just had another look at the driver and I think there is a race > condition for tpa6130a2_add_controls() and tpa6130a2_stereo_enable(). > > As far as I can see both functions check for "tpa6130a2_client != > NULL". tpa6130a2_client

Race condition in TPA6130A2 (Was: Re: Nokia N900 - audio TPA6130A2 problems)

2016-04-01 Thread Pali Rohár
On Wednesday 16 March 2016 15:47:10 Sebastian Reichel wrote: > I just had another look at the driver and I think there is a race > condition for tpa6130a2_add_controls() and tpa6130a2_stereo_enable(). > > As far as I can see both functions check for "tpa6130a2_client != > NULL". tpa6130a2_client

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-22 Thread Ivaylo Dimitrov
On 21.03.2016 21:34, Ivaylo Dimitrov wrote: On 21.03.2016 16:53, Sebastian Reichel wrote: Hi Mark, On Mon, Mar 21, 2016 at 01:45:15PM +, Mark Brown wrote: On Mon, Mar 21, 2016 at 03:39:15PM +0200, Ivaylo Dimitrov wrote: On 21.03.2016 13:45, Mark Brown wrote: No, if the voltage is

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-22 Thread Ivaylo Dimitrov
On 21.03.2016 21:34, Ivaylo Dimitrov wrote: On 21.03.2016 16:53, Sebastian Reichel wrote: Hi Mark, On Mon, Mar 21, 2016 at 01:45:15PM +, Mark Brown wrote: On Mon, Mar 21, 2016 at 03:39:15PM +0200, Ivaylo Dimitrov wrote: On 21.03.2016 13:45, Mark Brown wrote: No, if the voltage is

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-21 Thread Ivaylo Dimitrov
On 21.03.2016 16:53, Sebastian Reichel wrote: Hi Mark, On Mon, Mar 21, 2016 at 01:45:15PM +, Mark Brown wrote: On Mon, Mar 21, 2016 at 03:39:15PM +0200, Ivaylo Dimitrov wrote: On 21.03.2016 13:45, Mark Brown wrote: No, if the voltage is variable we can't tell what the current

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-21 Thread Ivaylo Dimitrov
On 21.03.2016 16:53, Sebastian Reichel wrote: Hi Mark, On Mon, Mar 21, 2016 at 01:45:15PM +, Mark Brown wrote: On Mon, Mar 21, 2016 at 03:39:15PM +0200, Ivaylo Dimitrov wrote: On 21.03.2016 13:45, Mark Brown wrote: No, if the voltage is variable we can't tell what the current

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-21 Thread Sebastian Reichel
Hi Mark, On Mon, Mar 21, 2016 at 01:45:15PM +, Mark Brown wrote: > On Mon, Mar 21, 2016 at 03:39:15PM +0200, Ivaylo Dimitrov wrote: > > On 21.03.2016 13:45, Mark Brown wrote: > > > >No, if the voltage is variable we can't tell what the current > > >constraints are without something telling

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-21 Thread Sebastian Reichel
Hi Mark, On Mon, Mar 21, 2016 at 01:45:15PM +, Mark Brown wrote: > On Mon, Mar 21, 2016 at 03:39:15PM +0200, Ivaylo Dimitrov wrote: > > On 21.03.2016 13:45, Mark Brown wrote: > > > >No, if the voltage is variable we can't tell what the current > > >constraints are without something telling

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-21 Thread Mark Brown
On Mon, Mar 21, 2016 at 03:39:15PM +0200, Ivaylo Dimitrov wrote: > On 21.03.2016 13:45, Mark Brown wrote: > >No, if the voltage is variable we can't tell what the current > >constraints are without something telling us so we just don't vary the > >voltage until we're told to do this. If we

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-21 Thread Mark Brown
On Mon, Mar 21, 2016 at 03:39:15PM +0200, Ivaylo Dimitrov wrote: > On 21.03.2016 13:45, Mark Brown wrote: > >No, if the voltage is variable we can't tell what the current > >constraints are without something telling us so we just don't vary the > >voltage until we're told to do this. If we

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-21 Thread Ivaylo Dimitrov
Hi, On 21.03.2016 13:45, Mark Brown wrote: No, if the voltage is variable we can't tell what the current constraints are without something telling us so we just don't vary the voltage until we're told to do this. If we immediately lower the voltage to the minimum supported voltage that's

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-21 Thread Ivaylo Dimitrov
Hi, On 21.03.2016 13:45, Mark Brown wrote: No, if the voltage is variable we can't tell what the current constraints are without something telling us so we just don't vary the voltage until we're told to do this. If we immediately lower the voltage to the minimum supported voltage that's

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-21 Thread Mark Brown
On Mon, Mar 21, 2016 at 01:04:18AM +0100, Sebastian Reichel wrote: > Right thinking about it, the voltage must also be configured for the > non always-on cases. So it's not a problem with the regulator > framework, but with twl-regulator's probe function, that should take > care of this.

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-21 Thread Mark Brown
On Mon, Mar 21, 2016 at 01:04:18AM +0100, Sebastian Reichel wrote: > Right thinking about it, the voltage must also be configured for the > non always-on cases. So it's not a problem with the regulator > framework, but with twl-regulator's probe function, that should take > care of this.

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-21 Thread Mark Brown
On Sun, Mar 20, 2016 at 06:17:04AM +0100, Sebastian Reichel wrote: > On Sat, Mar 19, 2016 at 10:49:57AM +0200, Ivaylo Dimitrov wrote: > > [7.215728] twl4030reg_is_enabled VMMC2 state 0x002e > > [7.223205] twl4030reg_is_enabled VMMC2 state 0x002e > Ok, so normal power up results

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-21 Thread Mark Brown
On Sun, Mar 20, 2016 at 06:17:04AM +0100, Sebastian Reichel wrote: > On Sat, Mar 19, 2016 at 10:49:57AM +0200, Ivaylo Dimitrov wrote: > > [7.215728] twl4030reg_is_enabled VMMC2 state 0x002e > > [7.223205] twl4030reg_is_enabled VMMC2 state 0x002e > Ok, so normal power up results

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-20 Thread Sebastian Reichel
Hi, On Mon, Mar 21, 2016 at 01:04:18AM +0100, Sebastian Reichel wrote: > On Sun, Mar 20, 2016 at 09:43:11PM +0200, Ivaylo Dimitrov wrote: > > On 20.03.2016 07:17, Sebastian Reichel wrote: > > >On Sat, Mar 19, 2016 at 10:49:57AM +0200, Ivaylo Dimitrov wrote: > > >>On 18.03.2016 17:04, Sebastian

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-20 Thread Sebastian Reichel
Hi, On Mon, Mar 21, 2016 at 01:04:18AM +0100, Sebastian Reichel wrote: > On Sun, Mar 20, 2016 at 09:43:11PM +0200, Ivaylo Dimitrov wrote: > > On 20.03.2016 07:17, Sebastian Reichel wrote: > > >On Sat, Mar 19, 2016 at 10:49:57AM +0200, Ivaylo Dimitrov wrote: > > >>On 18.03.2016 17:04, Sebastian

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-20 Thread Sebastian Reichel
Hi, On Sun, Mar 20, 2016 at 09:43:11PM +0200, Ivaylo Dimitrov wrote: > On 20.03.2016 07:17, Sebastian Reichel wrote: > >On Sat, Mar 19, 2016 at 10:49:57AM +0200, Ivaylo Dimitrov wrote: > >>On 18.03.2016 17:04, Sebastian Reichel wrote: > >>>On Fri, Mar 18, 2016 at 03:45:26PM +0200, Ivaylo Dimitrov

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-20 Thread Sebastian Reichel
Hi, On Sun, Mar 20, 2016 at 09:43:11PM +0200, Ivaylo Dimitrov wrote: > On 20.03.2016 07:17, Sebastian Reichel wrote: > >On Sat, Mar 19, 2016 at 10:49:57AM +0200, Ivaylo Dimitrov wrote: > >>On 18.03.2016 17:04, Sebastian Reichel wrote: > >>>On Fri, Mar 18, 2016 at 03:45:26PM +0200, Ivaylo Dimitrov

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-20 Thread Ivaylo Dimitrov
Hi On 20.03.2016 07:17, Sebastian Reichel wrote: Hi, On Sat, Mar 19, 2016 at 10:49:57AM +0200, Ivaylo Dimitrov wrote: On 18.03.2016 17:04, Sebastian Reichel wrote: On Fri, Mar 18, 2016 at 03:45:26PM +0200, Ivaylo Dimitrov wrote: On 18.03.2016 15:36, Sebastian Reichel wrote: Regulator is

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-20 Thread Ivaylo Dimitrov
Hi On 20.03.2016 07:17, Sebastian Reichel wrote: Hi, On Sat, Mar 19, 2016 at 10:49:57AM +0200, Ivaylo Dimitrov wrote: On 18.03.2016 17:04, Sebastian Reichel wrote: On Fri, Mar 18, 2016 at 03:45:26PM +0200, Ivaylo Dimitrov wrote: On 18.03.2016 15:36, Sebastian Reichel wrote: Regulator is

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-20 Thread Grygorii Strashko
On 03/16/2016 08:21 PM, Ivaylo Dimitrov wrote: > Hi, > > On 16.03.2016 16:47, Sebastian Reichel wrote: >> Hi, >> >> On Wed, Mar 16, 2016 at 02:33:19PM +0100, Pali Rohár wrote: >>> Hi! We found out that tpa6130a2 device is being initialized before >>> i2c_2 bus is initialized. So that is reason

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-20 Thread Grygorii Strashko
On 03/16/2016 08:21 PM, Ivaylo Dimitrov wrote: > Hi, > > On 16.03.2016 16:47, Sebastian Reichel wrote: >> Hi, >> >> On Wed, Mar 16, 2016 at 02:33:19PM +0100, Pali Rohár wrote: >>> Hi! We found out that tpa6130a2 device is being initialized before >>> i2c_2 bus is initialized. So that is reason

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-20 Thread Ivaylo Dimitrov
Hi, On 18.03.2016 15:36, Sebastian Reichel wrote: Have you tried the ideas from <20160317004917.GA6750@earth> (Date: Thu, 17 Mar 2016 01:49:18 +0100)? To the extend I understood them :) Regulator is V28_A, which is always-on, so it is enabled no matter what probe does. Anyway, I added a

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-20 Thread Ivaylo Dimitrov
Hi, On 18.03.2016 15:36, Sebastian Reichel wrote: Have you tried the ideas from <20160317004917.GA6750@earth> (Date: Thu, 17 Mar 2016 01:49:18 +0100)? To the extend I understood them :) Regulator is V28_A, which is always-on, so it is enabled no matter what probe does. Anyway, I added a

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Sebastian Reichel
Hi, On Sat, Mar 19, 2016 at 10:49:57AM +0200, Ivaylo Dimitrov wrote: > On 18.03.2016 17:04, Sebastian Reichel wrote: > >On Fri, Mar 18, 2016 at 03:45:26PM +0200, Ivaylo Dimitrov wrote: > >>On 18.03.2016 15:36, Sebastian Reichel wrote: > >>Regulator is V28_A, which is always-on, so it is enabled

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Sebastian Reichel
Hi, On Sat, Mar 19, 2016 at 10:49:57AM +0200, Ivaylo Dimitrov wrote: > On 18.03.2016 17:04, Sebastian Reichel wrote: > >On Fri, Mar 18, 2016 at 03:45:26PM +0200, Ivaylo Dimitrov wrote: > >>On 18.03.2016 15:36, Sebastian Reichel wrote: > >>Regulator is V28_A, which is always-on, so it is enabled

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Ivaylo Dimitrov
Hi, On 17.03.2016 16:32, Tony Lindgren wrote: Seems like a bug to me. My bets are on the deferred probe related Peter posted. I will test Peter's patch as well, however I really doubt internal pull-ups enabled by Nokia to be a bug - keep in mind there are (or at least were) enough devices

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Ivaylo Dimitrov
Hi, On 17.03.2016 16:32, Tony Lindgren wrote: Seems like a bug to me. My bets are on the deferred probe related Peter posted. I will test Peter's patch as well, however I really doubt internal pull-ups enabled by Nokia to be a bug - keep in mind there are (or at least were) enough devices

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Ivaylo Dimitrov
Hi, On 17.03.2016 15:01, Pali Rohár wrote: On Thursday 17 March 2016 09:56:22 Ivaylo Dimitrov wrote: Hi, Is camera on same bus as tpa? Maybe this is reason why camera is non-functional too? It doesn't matter, all the i2c busses are missing the pullups. Will fix the board DTS file later

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Ivaylo Dimitrov
Hi, On 17.03.2016 15:01, Pali Rohár wrote: On Thursday 17 March 2016 09:56:22 Ivaylo Dimitrov wrote: Hi, Is camera on same bus as tpa? Maybe this is reason why camera is non-functional too? It doesn't matter, all the i2c busses are missing the pullups. Will fix the board DTS file later

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Sebastian Reichel
Hi, On Wed, Mar 16, 2016 at 09:50:40PM +0200, Ivaylo Dimitrov wrote: > Jan 1 06:01:43 Nokia-N900 kernel: [6.947998] omap_i2c 4807.i2c: bus > 1 rev3.3 at 2200 kHz > Jan 1 06:01:43 Nokia-N900 kernel: [6.960632] tpa6130a2 2-0060: Write > failed > Jan 1 06:01:43 Nokia-N900 kernel: [

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Sebastian Reichel
Hi, On Wed, Mar 16, 2016 at 09:50:40PM +0200, Ivaylo Dimitrov wrote: > Jan 1 06:01:43 Nokia-N900 kernel: [6.947998] omap_i2c 4807.i2c: bus > 1 rev3.3 at 2200 kHz > Jan 1 06:01:43 Nokia-N900 kernel: [6.960632] tpa6130a2 2-0060: Write > failed > Jan 1 06:01:43 Nokia-N900 kernel: [

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Ivaylo Dimitrov
Hi, can you try this: diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c index 11d85c5c787a..7f5881bff5d9 100644 --- a/sound/soc/codecs/tpa6130a2.c +++ b/sound/soc/codecs/tpa6130a2.c @@ -386,6 +386,8 @@ static int tpa6130a2_probe(struct i2c_client *client,

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Ivaylo Dimitrov
Hi, can you try this: diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c index 11d85c5c787a..7f5881bff5d9 100644 --- a/sound/soc/codecs/tpa6130a2.c +++ b/sound/soc/codecs/tpa6130a2.c @@ -386,6 +386,8 @@ static int tpa6130a2_probe(struct i2c_client *client,

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Pali Rohár
Hi! We found out that tpa6130a2 device is being initialized before i2c_2 bus is initialized. So that is reason why tpa6130a2 fails... Any idea why kernel first try to initialize one i2c device even before bus itself is initialized? On Monday 14 March 2016 11:59:13 Peter Ujfalusi wrote: > Does

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Pali Rohár
Hi! We found out that tpa6130a2 device is being initialized before i2c_2 bus is initialized. So that is reason why tpa6130a2 fails... Any idea why kernel first try to initialize one i2c device even before bus itself is initialized? On Monday 14 March 2016 11:59:13 Peter Ujfalusi wrote: > Does

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Pali Rohár
On Thursday 17 March 2016 09:56:22 Ivaylo Dimitrov wrote: > Hi, > > On 17.03.2016 02:49, Sebastian Reichel wrote: > > > >mh both, the power gpio is turned off in tpa6130a2_power(0). I guess > >if you don't see the problem during probe() everything works? > > > >I have another idea though: In

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Pali Rohár
On Thursday 17 March 2016 09:56:22 Ivaylo Dimitrov wrote: > Hi, > > On 17.03.2016 02:49, Sebastian Reichel wrote: > > > >mh both, the power gpio is turned off in tpa6130a2_power(0). I guess > >if you don't see the problem during probe() everything works? > > > >I have another idea though: In

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Tony Lindgren
* Ivaylo Dimitrov [160317 06:11]: > Hi, > > On 17.03.2016 15:01, Pali Rohár wrote: > >On Thursday 17 March 2016 09:56:22 Ivaylo Dimitrov wrote: > >>Hi, > >> > > > >Is camera on same bus as tpa? Maybe this is reason why camera is > >non-functional too? > > > > It

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Tony Lindgren
* Ivaylo Dimitrov [160317 06:11]: > Hi, > > On 17.03.2016 15:01, Pali Rohár wrote: > >On Thursday 17 March 2016 09:56:22 Ivaylo Dimitrov wrote: > >>Hi, > >> > > > >Is camera on same bus as tpa? Maybe this is reason why camera is > >non-functional too? > > > > It doesn't matter, all the i2c

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Sebastian Reichel
Hi, On Fri, Mar 18, 2016 at 03:45:26PM +0200, Ivaylo Dimitrov wrote: > On 18.03.2016 15:36, Sebastian Reichel wrote: > > >Have you tried the ideas from <20160317004917.GA6750@earth> (Date: > >Thu, 17 Mar 2016 01:49:18 +0100)? > > > > To the extend I understood them :) > > Regulator is V28_A,

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Sebastian Reichel
Hi, On Fri, Mar 18, 2016 at 03:45:26PM +0200, Ivaylo Dimitrov wrote: > On 18.03.2016 15:36, Sebastian Reichel wrote: > > >Have you tried the ideas from <20160317004917.GA6750@earth> (Date: > >Thu, 17 Mar 2016 01:49:18 +0100)? > > > > To the extend I understood them :) > > Regulator is V28_A,

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Tony Lindgren
* Ivaylo Dimitrov [160317 06:51]: > Hi, > > On 17.03.2016 15:33, Tony Lindgren wrote: > > > >Check the schematics. If the hardware has external pull-ups on a > >line then don't enable the internal pull-ups. Otherwise both the > >external and intenal pulls are

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Tony Lindgren
* Ivaylo Dimitrov [160317 06:51]: > Hi, > > On 17.03.2016 15:33, Tony Lindgren wrote: > > > >Check the schematics. If the hardware has external pull-ups on a > >line then don't enable the internal pull-ups. Otherwise both the > >external and intenal pulls are parallel the pull value will be >

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Peter Ujfalusi
On 03/17/16 19:26, Ivaylo Dimitrov wrote: > Hi, > >> >> can you try this: >> diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c >> index 11d85c5c787a..7f5881bff5d9 100644 >> --- a/sound/soc/codecs/tpa6130a2.c >> +++ b/sound/soc/codecs/tpa6130a2.c >> @@ -386,6 +386,8 @@

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Peter Ujfalusi
On 03/17/16 19:26, Ivaylo Dimitrov wrote: > Hi, > >> >> can you try this: >> diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c >> index 11d85c5c787a..7f5881bff5d9 100644 >> --- a/sound/soc/codecs/tpa6130a2.c >> +++ b/sound/soc/codecs/tpa6130a2.c >> @@ -386,6 +386,8 @@

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Ivaylo Dimitrov
Hi, On 16.03.2016 20:32, Grygorii Strashko wrote: No-no :) take a look on i2c-omap.c r = i2c_add_numbered_adapter(adap); here you see messages from tpa6130a2 (create i2c devices & probe if drivers are ready) if (r) { dev_err(omap->dev, "failure adding

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Ivaylo Dimitrov
Hi, On 16.03.2016 20:32, Grygorii Strashko wrote: No-no :) take a look on i2c-omap.c r = i2c_add_numbered_adapter(adap); here you see messages from tpa6130a2 (create i2c devices & probe if drivers are ready) if (r) { dev_err(omap->dev, "failure adding

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Ivaylo Dimitrov
Hi, On 16.03.2016 16:47, Sebastian Reichel wrote: Hi, On Wed, Mar 16, 2016 at 02:33:19PM +0100, Pali Rohár wrote: Hi! We found out that tpa6130a2 device is being initialized before i2c_2 bus is initialized. So that is reason why tpa6130a2 fails... What do you mean by initialize? A call to

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Ivaylo Dimitrov
Hi, On 16.03.2016 16:47, Sebastian Reichel wrote: Hi, On Wed, Mar 16, 2016 at 02:33:19PM +0100, Pali Rohár wrote: Hi! We found out that tpa6130a2 device is being initialized before i2c_2 bus is initialized. So that is reason why tpa6130a2 fails... What do you mean by initialize? A call to

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Ivaylo Dimitrov
Hi, On 18.03.2016 17:04, Sebastian Reichel wrote: Hi, On Fri, Mar 18, 2016 at 03:45:26PM +0200, Ivaylo Dimitrov wrote: On 18.03.2016 15:36, Sebastian Reichel wrote: Regulator is V28_A, which is always-on, so it is enabled no matter what probe does. Anyway, I added a various delays after

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Ivaylo Dimitrov
Hi, On 18.03.2016 17:04, Sebastian Reichel wrote: Hi, On Fri, Mar 18, 2016 at 03:45:26PM +0200, Ivaylo Dimitrov wrote: On 18.03.2016 15:36, Sebastian Reichel wrote: Regulator is V28_A, which is always-on, so it is enabled no matter what probe does. Anyway, I added a various delays after

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Peter Ujfalusi
On 03/16/16 21:50, Ivaylo Dimitrov wrote: > Hi, > > On 16.03.2016 20:32, Grygorii Strashko wrote: >> >> No-no :) take a look on i2c-omap.c >> >> r = i2c_add_numbered_adapter(adap); >> >> here you see messages from tpa6130a2 (create i2c devices & probe if >> drivers are ready) >> >>

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Peter Ujfalusi
On 03/16/16 21:50, Ivaylo Dimitrov wrote: > Hi, > > On 16.03.2016 20:32, Grygorii Strashko wrote: >> >> No-no :) take a look on i2c-omap.c >> >> r = i2c_add_numbered_adapter(adap); >> >> here you see messages from tpa6130a2 (create i2c devices & probe if >> drivers are ready) >> >>

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Ivaylo Dimitrov
Hi, On 17.03.2016 02:49, Sebastian Reichel wrote: mh both, the power gpio is turned off in tpa6130a2_power(0). I guess if you don't see the problem during probe() everything works? I have another idea though: In opposit to the gpio, the regulator may also be referenced by something

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-19 Thread Ivaylo Dimitrov
Hi, On 17.03.2016 02:49, Sebastian Reichel wrote: mh both, the power gpio is turned off in tpa6130a2_power(0). I guess if you don't see the problem during probe() everything works? I have another idea though: In opposit to the gpio, the regulator may also be referenced by something

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-18 Thread Ивайло Димитров
Hi On Fri Mar 18 12:33:14 2016 Peter Ujfalusi wrote: > > But enabling the pull via DT for the i2c2 works? > No :(. I even migrated the driver to regmap - no gain. Maybe i2c bus is blocked by another device held in reset. The next thing I am going to try is to deassert

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-18 Thread Ивайло Димитров
Hi On Fri Mar 18 12:33:14 2016 Peter Ujfalusi wrote: > > But enabling the pull via DT for the i2c2 works? > No :(. I even migrated the driver to regmap - no gain. Maybe i2c bus is blocked by another device held in reset. The next thing I am going to try is to deassert reset/power gpios on

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-18 Thread Ivaylo Dimitrov
Hi, On 17.03.2016 15:33, Tony Lindgren wrote: Check the schematics. If the hardware has external pull-ups on a line then don't enable the internal pull-ups. Otherwise both the external and intenal pulls are parallel the pull value will be wrong. My guess is that on n900 all the i2c lines have

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-18 Thread Ivaylo Dimitrov
Hi, On 17.03.2016 15:33, Tony Lindgren wrote: Check the schematics. If the hardware has external pull-ups on a line then don't enable the internal pull-ups. Otherwise both the external and intenal pulls are parallel the pull value will be wrong. My guess is that on n900 all the i2c lines have

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-18 Thread Sebastian Reichel
Hi, On Wed, Mar 16, 2016 at 02:33:19PM +0100, Pali Rohár wrote: > Hi! We found out that tpa6130a2 device is being initialized before > i2c_2 bus is initialized. So that is reason why tpa6130a2 fails... What do you mean by initialize? A call to tpa6130a2_probe()? In that case I wonder about

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-18 Thread Sebastian Reichel
Hi, On Wed, Mar 16, 2016 at 02:33:19PM +0100, Pali Rohár wrote: > Hi! We found out that tpa6130a2 device is being initialized before > i2c_2 bus is initialized. So that is reason why tpa6130a2 fails... What do you mean by initialize? A call to tpa6130a2_probe()? In that case I wonder about

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-18 Thread Ivaylo Dimitrov
Hi, On 18.03.2016 17:04, Sebastian Reichel wrote: Did you by chance also test adding a delay after setting the power gpio? According to the datasheet: Start-up time from shutdown: typical 5ms :) if (data->power_gpio) { dev_err(_client->dev, " GPIO SET:

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-18 Thread Ivaylo Dimitrov
Hi, On 18.03.2016 17:04, Sebastian Reichel wrote: Did you by chance also test adding a delay after setting the power gpio? According to the datasheet: Start-up time from shutdown: typical 5ms :) if (data->power_gpio) { dev_err(_client->dev, " GPIO SET:

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-18 Thread Sebastian Reichel
On Fri, Mar 18, 2016 at 03:13:49PM +0200, Ивайло Димитров wrote: > On Fri Mar 18 12:33:14 2016 Peter Ujfalusi wrote: > > But enabling the pull via DT for the i2c2 works? > > No :(. I even migrated the driver to regmap - no gain. Maybe i2c > bus is blocked by another device

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-18 Thread Sebastian Reichel
On Fri, Mar 18, 2016 at 03:13:49PM +0200, Ивайло Димитров wrote: > On Fri Mar 18 12:33:14 2016 Peter Ujfalusi wrote: > > But enabling the pull via DT for the i2c2 works? > > No :(. I even migrated the driver to regmap - no gain. Maybe i2c > bus is blocked by another device held in reset. The

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-14 Thread Ivaylo Dimitrov
Hi, On 14.03.2016 11:59, Peter Ujfalusi wrote: Does the i2c communication breaks with DT _and_ non DT boot? IIRC, there was the same problem with legacy boot as well, but because there were tons of other problems, we did not investigate it :) Regards, Ivo

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-14 Thread Ivaylo Dimitrov
Hi, On 14.03.2016 11:59, Peter Ujfalusi wrote: Does the i2c communication breaks with DT _and_ non DT boot? IIRC, there was the same problem with legacy boot as well, but because there were tons of other problems, we did not investigate it :) Regards, Ivo

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-14 Thread Peter Ujfalusi
On 2016-03-12 14:42, Pali Rohár wrote: > Hi Sebastian! Commenting calling lp55xx_reset_device function did not > helped. Still getting that error. > > Tony, Peter, Jarkko: can you reproduce this problem? I'm really stucked > here... do not know where is problem or how to fix it. What we know

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-14 Thread Peter Ujfalusi
On 2016-03-12 14:42, Pali Rohár wrote: > Hi Sebastian! Commenting calling lp55xx_reset_device function did not > helped. Still getting that error. > > Tony, Peter, Jarkko: can you reproduce this problem? I'm really stucked > here... do not know where is problem or how to fix it. What we know

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-12 Thread Pali Rohár
On Sunday 06 March 2016 16:23:39 Sebastian Reichel wrote: > Hi Pali, > > On Tue, Jan 05, 2016 at 12:34:12AM +0100, Pali Rohár wrote: > > On Tuesday 04 August 2015 09:02:39 Peter Ujfalusi wrote: > > > On 08/03/2015 09:48 PM, Jarkko Nikula wrote: > > > > It is well possible that some regression got

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-12 Thread Pali Rohár
On Sunday 06 March 2016 16:23:39 Sebastian Reichel wrote: > Hi Pali, > > On Tue, Jan 05, 2016 at 12:34:12AM +0100, Pali Rohár wrote: > > On Tuesday 04 August 2015 09:02:39 Peter Ujfalusi wrote: > > > On 08/03/2015 09:48 PM, Jarkko Nikula wrote: > > > > It is well possible that some regression got

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-12 Thread Pali Rohár
On Tuesday 08 March 2016 07:45:32 Ivaylo Dimitrov wrote: > Hi, > > On 7.03.2016 13:59, Pali Rohár wrote: > > ... That error occurs randomly, not > > always. When I see it next time, I will try to comment that > > function if it happens... > > IIRC it is easier to cause it by booting to stock

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-12 Thread Pali Rohár
On Tuesday 08 March 2016 07:45:32 Ivaylo Dimitrov wrote: > Hi, > > On 7.03.2016 13:59, Pali Rohár wrote: > > ... That error occurs randomly, not > > always. When I see it next time, I will try to comment that > > function if it happens... > > IIRC it is easier to cause it by booting to stock

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-07 Thread Ivaylo Dimitrov
Hi, On 7.03.2016 13:59, Pali Rohár wrote: ... That error occurs randomly, not always. When I see it next time, I will try to comment that function if it happens... IIRC it is easier to cause it by booting to stock kernel first and then rebooting to mainline (without power-down in between)

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-07 Thread Ivaylo Dimitrov
Hi, On 7.03.2016 13:59, Pali Rohár wrote: ... That error occurs randomly, not always. When I see it next time, I will try to comment that function if it happens... IIRC it is easier to cause it by booting to stock kernel first and then rebooting to mainline (without power-down in between)

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-07 Thread Pali Rohár
On Sunday 06 March 2016 16:23:39 Sebastian Reichel wrote: > Hi Pali, > > On Tue, Jan 05, 2016 at 12:34:12AM +0100, Pali Rohár wrote: > > On Tuesday 04 August 2015 09:02:39 Peter Ujfalusi wrote: > > > On 08/03/2015 09:48 PM, Jarkko Nikula wrote: > > > > It is well possible that some regression got

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-07 Thread Pali Rohár
On Sunday 06 March 2016 16:23:39 Sebastian Reichel wrote: > Hi Pali, > > On Tue, Jan 05, 2016 at 12:34:12AM +0100, Pali Rohár wrote: > > On Tuesday 04 August 2015 09:02:39 Peter Ujfalusi wrote: > > > On 08/03/2015 09:48 PM, Jarkko Nikula wrote: > > > > It is well possible that some regression got

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-06 Thread Sebastian Reichel
Hi Pali, On Tue, Jan 05, 2016 at 12:34:12AM +0100, Pali Rohár wrote: > On Tuesday 04 August 2015 09:02:39 Peter Ujfalusi wrote: > > On 08/03/2015 09:48 PM, Jarkko Nikula wrote: > > > It is well possible that some regression got introduced to > > > TPA6130A2 I2C communication over the years

Re: Nokia N900 - audio TPA6130A2 problems

2016-03-06 Thread Sebastian Reichel
Hi Pali, On Tue, Jan 05, 2016 at 12:34:12AM +0100, Pali Rohár wrote: > On Tuesday 04 August 2015 09:02:39 Peter Ujfalusi wrote: > > On 08/03/2015 09:48 PM, Jarkko Nikula wrote: > > > It is well possible that some regression got introduced to > > > TPA6130A2 I2C communication over the years

Re: Nokia N900 - audio TPA6130A2 problems

2016-01-04 Thread Pali Rohár
On Tuesday 04 August 2015 09:02:39 Peter Ujfalusi wrote: > On 08/03/2015 09:48 PM, Jarkko Nikula wrote: > > It is well possible that some regression got introduced to > > TPA6130A2 I2C communication over the years without nobody than you > > now notices. We used to do QA back in Meego N900 days

Re: Nokia N900 - audio TPA6130A2 problems

2016-01-04 Thread Pali Rohár
On Tuesday 04 August 2015 09:02:39 Peter Ujfalusi wrote: > On 08/03/2015 09:48 PM, Jarkko Nikula wrote: > > It is well possible that some regression got introduced to > > TPA6130A2 I2C communication over the years without nobody than you > > now notices. We used to do QA back in Meego N900 days

Re: Nokia N900 - audio TPA6130A2 problems

2015-08-14 Thread Pali Rohár
On Friday 14 August 2015 22:46:49 Pavel Machek wrote: > Hi! > > > Maybe some power management problem? Something is not always > > initialized correctly? > > > > I remember that there is some problem (maybe in NoLo - Nokia > > bootloader) that sometimes chainloaded U-Boot (booted via NoLo) is >

Re: Nokia N900 - audio TPA6130A2 problems

2015-08-14 Thread Pavel Machek
Hi! > Maybe some power management problem? Something is not always initialized > correctly? > > I remember that there is some problem (maybe in NoLo - Nokia bootloader) > that sometimes chainloaded U-Boot (booted via NoLo) is not able to > initialize mmc chip (all read operation fails). In

Re: Nokia N900 - audio TPA6130A2 problems

2015-08-14 Thread Pavel Machek
Hi! Maybe some power management problem? Something is not always initialized correctly? I remember that there is some problem (maybe in NoLo - Nokia bootloader) that sometimes chainloaded U-Boot (booted via NoLo) is not able to initialize mmc chip (all read operation fails). In U-Boot I

Re: Nokia N900 - audio TPA6130A2 problems

2015-08-14 Thread Pali Rohár
On Friday 14 August 2015 22:46:49 Pavel Machek wrote: Hi! Maybe some power management problem? Something is not always initialized correctly? I remember that there is some problem (maybe in NoLo - Nokia bootloader) that sometimes chainloaded U-Boot (booted via NoLo) is not able to

Re: Nokia N900 - audio TPA6130A2 problems

2015-08-04 Thread Peter Ujfalusi
On 08/03/2015 09:48 PM, Jarkko Nikula wrote: > It is well possible that some regression got introduced to TPA6130A2 I2C > communication over the years without nobody than you now notices. We > used to do QA back in Meego N900 days but that was pre 3.x kernels. No major changes has been done to

Re: Nokia N900 - audio TPA6130A2 problems

2015-08-04 Thread Peter Ujfalusi
On 08/03/2015 09:48 PM, Jarkko Nikula wrote: It is well possible that some regression got introduced to TPA6130A2 I2C communication over the years without nobody than you now notices. We used to do QA back in Meego N900 days but that was pre 3.x kernels. No major changes has been done to the

Re: Nokia N900 - audio TPA6130A2 problems

2015-08-03 Thread Pali Rohár
On Monday 03 August 2015 20:48:28 Jarkko Nikula wrote: > On 08/03/2015 09:17 PM, Pali Rohár wrote: > > On Monday 03 August 2015 20:03:16 Jarkko Nikula wrote: > >> Hi > >> > >> On 08/01/2015 01:18 PM, Pali Rohár wrote: > >>> On Saturday 25 July 2015 15:17:13 Lars-Peter Clausen wrote: > >>> Hello,

Re: Nokia N900 - audio TPA6130A2 problems

2015-08-03 Thread Jarkko Nikula
On 08/03/2015 09:17 PM, Pali Rohár wrote: > On Monday 03 August 2015 20:03:16 Jarkko Nikula wrote: >> Hi >> >> On 08/01/2015 01:18 PM, Pali Rohár wrote: >>> On Saturday 25 July 2015 15:17:13 Lars-Peter Clausen wrote: >>> Hello, your patch did not helped. Problem is still there... >> >> For me

Re: Nokia N900 - audio TPA6130A2 problems

2015-08-03 Thread Jarkko Nikula
Hi On 08/01/2015 01:18 PM, Pali Rohár wrote: > On Saturday 25 July 2015 15:17:13 Lars-Peter Clausen wrote: >> On 07/25/2015 12:28 PM, Pali Rohár wrote: >>> Hello, >>> >>> sometimes after rebooting Nokia N900 initializing alsa audio fails. >>> Here output from dmesg log when it happen: >>> >>> [

Re: Nokia N900 - audio TPA6130A2 problems

2015-08-03 Thread Pali Rohár
On Monday 03 August 2015 20:03:16 Jarkko Nikula wrote: > Hi > > On 08/01/2015 01:18 PM, Pali Rohár wrote: > > On Saturday 25 July 2015 15:17:13 Lars-Peter Clausen wrote: > >> On 07/25/2015 12:28 PM, Pali Rohár wrote: > >>> Hello, > >>> > >>> sometimes after rebooting Nokia N900 initializing alsa

Re: Nokia N900 - audio TPA6130A2 problems

2015-08-03 Thread Jarkko Nikula
Hi On 08/01/2015 01:18 PM, Pali Rohár wrote: On Saturday 25 July 2015 15:17:13 Lars-Peter Clausen wrote: On 07/25/2015 12:28 PM, Pali Rohár wrote: Hello, sometimes after rebooting Nokia N900 initializing alsa audio fails. Here output from dmesg log when it happen: [6.925140] tpa6130a2

Re: Nokia N900 - audio TPA6130A2 problems

2015-08-03 Thread Jarkko Nikula
On 08/03/2015 09:17 PM, Pali Rohár wrote: On Monday 03 August 2015 20:03:16 Jarkko Nikula wrote: Hi On 08/01/2015 01:18 PM, Pali Rohár wrote: On Saturday 25 July 2015 15:17:13 Lars-Peter Clausen wrote: Hello, your patch did not helped. Problem is still there... For me v4.2-rc5 works, i.e.

Re: Nokia N900 - audio TPA6130A2 problems

2015-08-03 Thread Pali Rohár
On Monday 03 August 2015 20:48:28 Jarkko Nikula wrote: On 08/03/2015 09:17 PM, Pali Rohár wrote: On Monday 03 August 2015 20:03:16 Jarkko Nikula wrote: Hi On 08/01/2015 01:18 PM, Pali Rohár wrote: On Saturday 25 July 2015 15:17:13 Lars-Peter Clausen wrote: Hello, your patch did not

Re: Nokia N900 - audio TPA6130A2 problems

2015-08-03 Thread Pali Rohár
On Monday 03 August 2015 20:03:16 Jarkko Nikula wrote: Hi On 08/01/2015 01:18 PM, Pali Rohár wrote: On Saturday 25 July 2015 15:17:13 Lars-Peter Clausen wrote: On 07/25/2015 12:28 PM, Pali Rohár wrote: Hello, sometimes after rebooting Nokia N900 initializing alsa audio fails. Here

Re: Nokia N900 - audio TPA6130A2 problems

2015-08-01 Thread Pali Rohár
On Saturday 25 July 2015 15:17:13 Lars-Peter Clausen wrote: > On 07/25/2015 12:28 PM, Pali Rohár wrote: > > Hello, > > > > sometimes after rebooting Nokia N900 initializing alsa audio fails. > > Here output from dmesg log when it happen: > > > > [6.925140] tpa6130a2 2-0060: Write failed > >

Re: Nokia N900 - audio TPA6130A2 problems

2015-08-01 Thread Pali Rohár
On Saturday 25 July 2015 15:17:13 Lars-Peter Clausen wrote: On 07/25/2015 12:28 PM, Pali Rohár wrote: Hello, sometimes after rebooting Nokia N900 initializing alsa audio fails. Here output from dmesg log when it happen: [6.925140] tpa6130a2 2-0060: Write failed [6.929534]

  1   2   >