mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: "Ivaylo Dimitrov" <ivo.g.dimitrov.75@gmail.com>,
	"Grygorii Strashko" <grygorii.strashko@ti.com>,
	"Sebastian Reichel" <sre@kernel.org>,
	"Pali Rohár" <pali.rohar@gmail.com>
Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>,
	Tony Lindgren <tony@atomide.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	<linux-kernel@vger.kernel.org>, <linux-omap@vger.kernel.org>,
	Pavel Machek <pavel@ucw.cz>, Aaro Koskinen <aaro.koskinen@iki.fi>,
	Nishanth Menon <nm@ti.com>, <merlijn@wizzup.org>
Subject: Re: Nokia N900 - audio TPA6130A2 problems
Date: Thu, 17 Mar 2016 09:53:38 +0200	[thread overview]
Message-ID: <56EA6282.5050501@ti.com> (raw)
In-Reply-To: <56E9B910.7000904@gmail.com>

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)
>>
>>     if (r) {
>>         dev_err(omap->dev, "failure adding adapter\n");
>>         goto err_unuse_clocks;
>>     }
>>
>>     dev_info(omap->dev, "bus %d rev%d.%d at %d kHz\n", adap->nr,
>>          major, minor, omap->speed);
>>
>> ^^^^ and here "omap_i2c 48072000.i2c:  bus 2 rev3.3 at 100 kHz"
>>
>> so everything is ok with probe order
>>
> 
> Sorry for the noise then :)
> 
> here is the log with dump_stack() in tpa6130a2_i2c_write:
> 
> Jan  1 06:01:43 Nokia-N900 kernel: [    6.947998] omap_i2c 48070000.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: [    6.965026] CPU: 0 PID: 6 Comm:
> kworker/u2:0 Not tainted 4.5.0-rc5+ #26
> Jan  1 06:01:43 Nokia-N900 kernel: [    6.972106] Hardware name: Nokia RX-51
> board
> Jan  1 06:01:43 Nokia-N900 kernel: [    6.976684] Workqueue: deferwq
> deferred_probe_work_func
> Jan  1 06:01:43 Nokia-N900 kernel: [    6.982299] [<c0013c18>]
> (unwind_backtrace) from [<c0011f38>] (show_stack+0x10/0x14)
> Jan  1 06:01:43 Nokia-N900 kernel: [    6.990570] [<c0011f38>] (show_stack)
> from [<c0390884>] (tpa6130a2_i2c_write+0x58/0x90)
> Jan  1 06:01:43 Nokia-N900 kernel: [    6.999114] [<c0390884>]
> (tpa6130a2_i2c_write) from [<c0390968>] (tpa6130a2_power+0xac/0x1c4)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.008239] [<c0390968>]
> (tpa6130a2_power) from [<c0390d80>] (tpa6130a2_probe+0x144/0x234)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.017059] [<c0390d80>]
> (tpa6130a2_probe) from [<c032b650>] (i2c_device_probe+0x170/0x1b8)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.025939] [<c032b650>]
> (i2c_device_probe) from [<c02a7bd4>] (driver_probe_device+0x120/0x2b0)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.035247] [<c02a7bd4>]
> (driver_probe_device) from [<c02a62c8>] (bus_for_each_drv+0x48/0x8c)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.044311] [<c02a62c8>]
> (bus_for_each_drv) from [<c02a7a20>] (__device_attach+0x88/0xf8)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.053009] [<c02a7a20>]
> (__device_attach) from [<c02a70b0>] (bus_probe_device+0x28/0x80)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.061737] [<c02a70b0>]
> (bus_probe_device) from [<c02a5680>] (device_add+0x3c0/0x55c)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.070159] [<c02a5680>] (device_add)
> from [<c032cf28>] (i2c_new_device+0xf8/0x198)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.078308] [<c032cf28>]
> (i2c_new_device) from [<c032d4e8>] (i2c_register_adapter+0x2d0/0x47c)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.087432] [<c032d4e8>]
> (i2c_register_adapter) from [<c032f084>] (omap_i2c_probe+0x54c/0x64c)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.096618] [<c032f084>]
> (omap_i2c_probe) from [<c02a93bc>] (platform_drv_probe+0x58/0xa0)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.105438] [<c02a93bc>]
> (platform_drv_probe) from [<c02a7bd4>] (driver_probe_device+0x120/0x2b0)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.114929] [<c02a7bd4>]
> (driver_probe_device) from [<c02a62c8>] (bus_for_each_drv+0x48/0x8c)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.123962] [<c02a62c8>]
> (bus_for_each_drv) from [<c02a7a20>] (__device_attach+0x88/0xf8)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.132659] [<c02a7a20>]
> (__device_attach) from [<c02a70b0>] (bus_probe_device+0x28/0x80)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.141357] [<c02a70b0>]
> (bus_probe_device) from [<c02a7508>] (deferred_probe_work_func+0x58/0x84)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.150939] [<c02a7508>]
> (deferred_probe_work_func) from [<c0042a50>] (process_one_work+0x1c4/0x324)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.160705] [<c0042a50>]
> (process_one_work) from [<c0042ef4>] (worker_thread+0x314/0x4a8)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.169433] [<c0042ef4>] (worker_thread)
> from [<c00474e4>] (kthread+0xcc/0xe0)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.177154] [<c00474e4>] (kthread) from
> [<c000f218>] (ret_from_fork+0x14/0x3c)
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.184783] tpa6130a2 2-0060: Failed to
> initialize chip
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.190551] tpa6130a2: probe of 2-0060
> failed with error -121
> Jan  1 06:01:43 Nokia-N900 kernel: [    7.197174] omap_i2c 48072000.i2c: bus 2
> rev3.3 at 100 kHz
> 
> now, the only thing I can think of remaining to test is the reset gpio set-up -
> I wonder if it is possible to be set in safe mode(or input, or... ?), so the
> reset is never deasserted.

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,
                data->power_gpio = pdata->power_gpio;
        } else if (np) {
                data->power_gpio = of_get_named_gpio(np, "power-gpio", 0);
+               if (data->power_gpio == -EPROBE_DEFER)
+                       return data->power_gpio;
        } else {
                dev_err(dev, "Platform data not set\n");
                dump_stack();

-- 
Péter

  parent reply	other threads:[~2016-03-17  7:54 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-25 10:28 Pali Rohár
2015-07-25 13:17 ` Lars-Peter Clausen
2015-08-01 10:18   ` Pali Rohár
2015-08-03 18:03     ` Jarkko Nikula
2015-08-03 18:17       ` Pali Rohár
2015-08-03 18:48         ` Jarkko Nikula
2015-08-03 18:55           ` Pali Rohár
2015-08-04  7:02           ` Peter Ujfalusi
2016-01-04 23:34             ` Pali Rohár
2016-03-06 15:23               ` Sebastian Reichel
2016-03-07 11:59                 ` Pali Rohár
2016-03-08  6:45                   ` Ivaylo Dimitrov
2016-03-12 12:39                     ` Pali Rohár
2016-03-12 12:42                 ` Pali Rohár
2016-03-14  9:59                   ` Peter Ujfalusi
2016-03-14 17:05                     ` Ivaylo Dimitrov
2016-03-16 13:33                     ` Pali Rohár
2016-03-16 14:47                       ` Sebastian Reichel
2016-03-16 18:21                         ` Ivaylo Dimitrov
2016-03-16 18:32                           ` Grygorii Strashko
2016-03-16 19:50                             ` Ivaylo Dimitrov
2016-03-17  0:49                               ` Sebastian Reichel
2016-03-17  7:56                                 ` Ivaylo Dimitrov
2016-03-17 13:01                                   ` Pali Rohár
2016-03-17 13:11                                     ` Ivaylo Dimitrov
2016-03-17 13:33                                       ` Tony Lindgren
2016-03-17 13:50                                         ` Ivaylo Dimitrov
2016-03-17 14:32                                           ` Tony Lindgren
2016-03-17 14:58                                             ` Ivaylo Dimitrov
2016-03-17  7:53                               ` Peter Ujfalusi [this message]
2016-03-17 17:26                                 ` Ivaylo Dimitrov
2016-03-18 10:33                                   ` Peter Ujfalusi
2016-03-18 13:13                                     ` Ивайло Димитров
2016-03-18 13:36                                       ` Sebastian Reichel
2016-03-18 13:45                                         ` Ivaylo Dimitrov
2016-03-18 15:04                                           ` Sebastian Reichel
2016-03-18 15:56                                             ` Ivaylo Dimitrov
2016-03-19  8:49                                             ` Ivaylo Dimitrov
2016-03-20  5:17                                               ` Sebastian Reichel
2016-03-20 19:43                                                 ` Ivaylo Dimitrov
2016-03-21  0:04                                                   ` Sebastian Reichel
2016-03-21  1:40                                                     ` Sebastian Reichel
2016-03-21 12:03                                                     ` Mark Brown
2016-03-21 11:45                                                 ` Mark Brown
2016-03-21 13:39                                                   ` Ivaylo Dimitrov
2016-03-21 13:45                                                     ` Mark Brown
2016-03-21 14:53                                                       ` Sebastian Reichel
2016-03-21 19:34                                                         ` Ivaylo Dimitrov
2016-03-22  8:02                                                           ` Ivaylo Dimitrov
2016-04-01 10:43                         ` Race condition in TPA6130A2 (Was: Re: Nokia N900 - audio TPA6130A2 problems) Pali Rohár
2015-08-14 20:46         ` Nokia N900 - audio TPA6130A2 problems Pavel Machek
2015-08-14 20:54           ` Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56EA6282.5050501@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=grygorii.strashko@ti.com \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=jarkko.nikula@bitmer.com \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=merlijn@wizzup.org \
    --cc=nm@ti.com \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=sre@kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome