All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] [patch 1/1] imx-sgtl5000: return E_PROBE_DEFER if ssi/codec not found
@ 2013-06-20 21:20 Arnaud Patard
  2013-06-23 21:48 ` Fabio Estevam
  2013-07-04 14:59 ` Mark Brown
  0 siblings, 2 replies; 5+ messages in thread
From: Arnaud Patard @ 2013-06-20 21:20 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Liam Girdwood, Shawn Guo

[-- Attachment #1: imx-sgtl5000-probe-defer.patch --]
[-- Type: text/plain, Size: 1068 bytes --]

If the ssi or codec drivers are not loaded (for instance, because spi or i2c
bus drivers are not loaded), returning -EINVAL will for people to unload and
then reload the module to get sound working. Returning E_PROBE_DEFER will
mitigate this.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>

Index: linux/sound/soc/fsl/imx-sgtl5000.c
===================================================================
--- linux.orig/sound/soc/fsl/imx-sgtl5000.c	2013-05-16 09:33:01.000000000 +0200
+++ linux/sound/soc/fsl/imx-sgtl5000.c	2013-05-16 09:35:14.000000000 +0200
@@ -113,13 +113,13 @@ static int imx_sgtl5000_probe(struct pla
 	ssi_pdev = of_find_device_by_node(ssi_np);
 	if (!ssi_pdev) {
 		dev_err(&pdev->dev, "failed to find SSI platform device\n");
-		ret = -EINVAL;
+		ret = -EPROBE_DEFER;
 		goto fail;
 	}
 	codec_dev = of_find_i2c_device_by_node(codec_np);
 	if (!codec_dev) {
 		dev_err(&pdev->dev, "failed to find codec platform device\n");
-		return -EINVAL;
+		return -EPROBE_DEFER;
 	}
 
 	data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] [patch 1/1] imx-sgtl5000: return E_PROBE_DEFER if ssi/codec not found
  2013-06-20 21:20 [RFC] [patch 1/1] imx-sgtl5000: return E_PROBE_DEFER if ssi/codec not found Arnaud Patard
@ 2013-06-23 21:48 ` Fabio Estevam
  2013-06-24  7:33   ` Arnaud Patard
  2013-07-04 14:59 ` Mark Brown
  1 sibling, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2013-06-23 21:48 UTC (permalink / raw)
  To: Arnaud Patard; +Cc: alsa-devel, Mark Brown, Liam Girdwood, Shawn Guo

On Thu, Jun 20, 2013 at 6:20 PM, Arnaud Patard
<arnaud.patard@rtp-net.org> wrote:
> If the ssi or codec drivers are not loaded (for instance, because spi or i2c
> bus drivers are not loaded), returning -EINVAL will for people to unload and
> then reload the module to get sound working. Returning E_PROBE_DEFER will
> mitigate this.
>
> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>

Which board you are using that fails to probe sgtl5000?

I have fixed this problem for some boards recently.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] [patch 1/1] imx-sgtl5000: return E_PROBE_DEFER if ssi/codec not found
  2013-06-23 21:48 ` Fabio Estevam
@ 2013-06-24  7:33   ` Arnaud Patard
  2013-06-24 23:26     ` Fabio Estevam
  0 siblings, 1 reply; 5+ messages in thread
From: Arnaud Patard @ 2013-06-24  7:33 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: alsa-devel, Mark Brown, Liam Girdwood, Shawn Guo

Fabio Estevam <festevam@gmail.com> writes:

> On Thu, Jun 20, 2013 at 6:20 PM, Arnaud Patard
> <arnaud.patard@rtp-net.org> wrote:
>> If the ssi or codec drivers are not loaded (for instance, because spi or i2c
>> bus drivers are not loaded), returning -EINVAL will for people to unload and
>> then reload the module to get sound working. Returning E_PROBE_DEFER will
>> mitigate this.
>>
>> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
>
> Which board you are using that fails to probe sgtl5000?
>

It was on imx53-qsb, nearly everything in module and boot with DT.

> I have fixed this problem for some boards recently.

I'm curious to know how to fix that with modules on a per board
basis. Please, explain.

Thanks,
Arnaud

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] [patch 1/1] imx-sgtl5000: return E_PROBE_DEFER if ssi/codec not found
  2013-06-24  7:33   ` Arnaud Patard
@ 2013-06-24 23:26     ` Fabio Estevam
  0 siblings, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2013-06-24 23:26 UTC (permalink / raw)
  To: Arnaud Patard; +Cc: alsa-devel, Mark Brown, Liam Girdwood, Shawn Guo

On Mon, Jun 24, 2013 at 4:33 AM, Arnaud Patard
<arnaud.patard@rtp-net.org> wrote:

> I'm curious to know how to fix that with modules on a per board
> basis. Please, explain.

Ok, looks like a different problem than the one I handled before.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC] [patch 1/1] imx-sgtl5000: return E_PROBE_DEFER if ssi/codec not found
  2013-06-20 21:20 [RFC] [patch 1/1] imx-sgtl5000: return E_PROBE_DEFER if ssi/codec not found Arnaud Patard
  2013-06-23 21:48 ` Fabio Estevam
@ 2013-07-04 14:59 ` Mark Brown
  1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2013-07-04 14:59 UTC (permalink / raw)
  To: Arnaud Patard; +Cc: alsa-devel, Shawn Guo, Liam Girdwood


[-- Attachment #1.1: Type: text/plain, Size: 332 bytes --]

On Thu, Jun 20, 2013 at 11:20:49PM +0200, Arnaud Patard wrote:
> If the ssi or codec drivers are not loaded (for instance, because spi or i2c
> bus drivers are not loaded), returning -EINVAL will for people to unload and
> then reload the module to get sound working. Returning E_PROBE_DEFER will
> mitigate this.

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-07-04 14:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-20 21:20 [RFC] [patch 1/1] imx-sgtl5000: return E_PROBE_DEFER if ssi/codec not found Arnaud Patard
2013-06-23 21:48 ` Fabio Estevam
2013-06-24  7:33   ` Arnaud Patard
2013-06-24 23:26     ` Fabio Estevam
2013-07-04 14:59 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.