All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: fix pxa2xx-i2s clk_get call
@ 2008-08-30 20:45 Dmitry Baryshkov
  2008-08-30 21:51 ` Mark Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Baryshkov @ 2008-08-30 20:45 UTC (permalink / raw)
  To: alsa-devel; +Cc: Dmitry Baryshkov, Mark Brown

pxa2xx-isa: probe actual device and use it for clk_get call
thus fixing error during startup hook

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/pxa/pxa2xx-i2s.c |   40 +++++++++++++++++++++++++++++++++++++++-
 1 files changed, 39 insertions(+), 1 deletions(-)

diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 8548818..c796b18 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -16,6 +16,7 @@
 #include <linux/device.h>
 #include <linux/delay.h>
 #include <linux/clk.h>
+#include <linux/platform_device.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
 #include <sound/initval.h>
@@ -81,7 +82,6 @@ static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream)
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
 
-	clk_i2s = clk_get(NULL, "I2SCLK");
 	if (IS_ERR(clk_i2s))
 		return PTR_ERR(clk_i2s);
 
@@ -152,6 +152,7 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream,
 	pxa_gpio_mode(gpio_bus[pxa_i2s.master].tx);
 	pxa_gpio_mode(gpio_bus[pxa_i2s.master].frm);
 	pxa_gpio_mode(gpio_bus[pxa_i2s.master].clk);
+	BUG_ON(IS_ERR(clk_i2s));
 	clk_enable(clk_i2s);
 	pxa_i2s_wait();
 
@@ -317,6 +318,43 @@ struct snd_soc_dai pxa_i2s_dai = {
 
 EXPORT_SYMBOL_GPL(pxa_i2s_dai);
 
+static int pxa2xx_i2s_probe(struct platform_device *dev)
+{
+	clk_i2s = clk_get(&dev->dev, "I2SCLK");
+	return IS_ERR(clk_i2s) ? PTR_ERR(clk_i2s) : 0;
+}
+
+static int __devexit pxa2xx_i2s_remove(struct platform_device *dev)
+{
+	clk_put(clk_i2s);
+	clk_i2s = ERR_PTR(-ENOENT);
+	return 0;
+}
+
+static struct platform_driver pxa2xx_i2s_driver = {
+	.probe = pxa2xx_i2s_probe,
+	.remove = __devexit_p(pxa2xx_i2s_remove),
+
+	.driver = {
+		.name = "pxa2xx-i2s",
+		.owner = THIS_MODULE,
+	},
+};
+
+static int __init pxa2xx_i2s_init(void)
+{
+	clk_i2s = ERR_PTR(-ENOENT);
+	return platform_driver_register(&pxa2xx_i2s_driver);
+}
+
+static void __exit pxa2xx_i2s_exit(void)
+{
+	platform_driver_unregister(&pxa2xx_i2s_driver);
+}
+
+module_init(pxa2xx_i2s_init);
+module_exit(pxa2xx_i2s_exit);
+
 /* Module information */
 MODULE_AUTHOR("Liam Girdwood, liam.girdwood@wolfsonmicro.com, www.wolfsonmicro.com");
 MODULE_DESCRIPTION("pxa2xx I2S SoC Interface");
-- 
1.5.6.3

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

* Re: [PATCH] ASoC: fix pxa2xx-i2s clk_get call
  2008-08-30 20:45 [PATCH] ASoC: fix pxa2xx-i2s clk_get call Dmitry Baryshkov
@ 2008-08-30 21:51 ` Mark Brown
  2008-08-30 21:52   ` Dmitry
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2008-08-30 21:51 UTC (permalink / raw)
  To: Dmitry Baryshkov; +Cc: alsa-devel

On Sun, Aug 31, 2008 at 12:45:02AM +0400, Dmitry Baryshkov wrote:
> pxa2xx-isa: probe actual device and use it for clk_get call
> thus fixing error during startup hook

i2s, not isa.  Other than that

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

and IIRC Liam acked it already as well.

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

* Re: [PATCH] ASoC: fix pxa2xx-i2s clk_get call
  2008-08-30 21:51 ` Mark Brown
@ 2008-08-30 21:52   ` Dmitry
  2008-08-31 11:05     ` Liam Girdwood
  2008-08-31 17:21     ` Mark Brown
  0 siblings, 2 replies; 7+ messages in thread
From: Dmitry @ 2008-08-30 21:52 UTC (permalink / raw)
  To: Dmitry Baryshkov, alsa-devel

2008/8/31 Mark Brown <broonie@sirena.org.uk>:
> On Sun, Aug 31, 2008 at 12:45:02AM +0400, Dmitry Baryshkov wrote:
>> pxa2xx-isa: probe actual device and use it for clk_get call
>> thus fixing error during startup hook
>
> i2s, not isa.  Other than that
>
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
>
> and IIRC Liam acked it already as well.
>

... and asked to repost on alsa-devel

-- 
With best wishes
Dmitry

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

* Re: [PATCH] ASoC: fix pxa2xx-i2s clk_get call
  2008-08-30 21:52   ` Dmitry
@ 2008-08-31 11:05     ` Liam Girdwood
  2008-08-31 16:29       ` Dmitry Baryshkov
  2008-08-31 17:21     ` Mark Brown
  1 sibling, 1 reply; 7+ messages in thread
From: Liam Girdwood @ 2008-08-31 11:05 UTC (permalink / raw)
  To: Dmitry; +Cc: alsa-devel

On Sun, 2008-08-31 at 01:52 +0400, Dmitry wrote:
> 2008/8/31 Mark Brown <broonie@sirena.org.uk>:
> > On Sun, Aug 31, 2008 at 12:45:02AM +0400, Dmitry Baryshkov wrote:
> >> pxa2xx-isa: probe actual device and use it for clk_get call
> >> thus fixing error during startup hook
> >
> > i2s, not isa.  Other than that
> >
> > Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> >
> > and IIRC Liam acked it already as well.
> >
> 
> ... and asked to repost on alsa-devel
> 

It's best to additionally post these patches to alsa-devel for Takashi
to upstream.

Liam 

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

* Re: [PATCH] ASoC: fix pxa2xx-i2s clk_get call
  2008-08-31 11:05     ` Liam Girdwood
@ 2008-08-31 16:29       ` Dmitry Baryshkov
  2008-09-01 10:12         ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Baryshkov @ 2008-08-31 16:29 UTC (permalink / raw)
  To: alsa-devel

Liam Girdwood wrote:

> On Sun, 2008-08-31 at 01:52 +0400, Dmitry wrote:
>> 2008/8/31 Mark Brown <broonie@sirena.org.uk>:
>> > On Sun, Aug 31, 2008 at 12:45:02AM +0400, Dmitry Baryshkov wrote:
>> >> pxa2xx-isa: probe actual device and use it for clk_get call thus
>> >> fixing error during startup hook
>> >
>> > i2s, not isa.  Other than that
>> >
>> > Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
>> >
>> > and IIRC Liam acked it already as well.
>> >
>> >
>> ... and asked to repost on alsa-devel
>> 
>> 
> It's best to additionally post these patches to alsa-devel for Takashi
> to upstream.

And since it fixes the regression, could it be pushed into 2.6.27-rc?

-- 
With best wishes
Dmitry

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

* Re: [PATCH] ASoC: fix pxa2xx-i2s clk_get call
  2008-08-30 21:52   ` Dmitry
  2008-08-31 11:05     ` Liam Girdwood
@ 2008-08-31 17:21     ` Mark Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Brown @ 2008-08-31 17:21 UTC (permalink / raw)
  To: Dmitry; +Cc: alsa-devel

On Sun, Aug 31, 2008 at 01:52:09AM +0400, Dmitry wrote:
> 2008/8/31 Mark Brown <broonie@sirena.org.uk>:

> > and IIRC Liam acked it already as well.

> ... and asked to repost on alsa-devel

Right, my point was that it's helpful to also include acks when
reposting patches since that lets people know what review has already
been carried out.  I know I find it helpful for my own acks since it
saves me re-reviewing patches I've already checked.

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

* Re: [PATCH] ASoC: fix pxa2xx-i2s clk_get call
  2008-08-31 16:29       ` Dmitry Baryshkov
@ 2008-09-01 10:12         ` Takashi Iwai
  0 siblings, 0 replies; 7+ messages in thread
From: Takashi Iwai @ 2008-09-01 10:12 UTC (permalink / raw)
  To: Dmitry Baryshkov; +Cc: alsa-devel

At Sun, 31 Aug 2008 16:29:38 +0000 (UTC),
Dmitry Baryshkov wrote:
> 
> Liam Girdwood wrote:
> 
> > On Sun, 2008-08-31 at 01:52 +0400, Dmitry wrote:
> >> 2008/8/31 Mark Brown <broonie@sirena.org.uk>:
> >> > On Sun, Aug 31, 2008 at 12:45:02AM +0400, Dmitry Baryshkov wrote:
> >> >> pxa2xx-isa: probe actual device and use it for clk_get call thus
> >> >> fixing error during startup hook
> >> >
> >> > i2s, not isa.  Other than that
> >> >
> >> > Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> >> >
> >> > and IIRC Liam acked it already as well.
> >> >
> >> >
> >> ... and asked to repost on alsa-devel
> >> 
> >> 
> > It's best to additionally post these patches to alsa-devel for Takashi
> > to upstream.
> 
> And since it fixes the regression, could it be pushed into 2.6.27-rc?

Yes, I'll do it.


thanks,

Takashi

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

end of thread, other threads:[~2008-09-01 10:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-30 20:45 [PATCH] ASoC: fix pxa2xx-i2s clk_get call Dmitry Baryshkov
2008-08-30 21:51 ` Mark Brown
2008-08-30 21:52   ` Dmitry
2008-08-31 11:05     ` Liam Girdwood
2008-08-31 16:29       ` Dmitry Baryshkov
2008-09-01 10:12         ` Takashi Iwai
2008-08-31 17:21     ` 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.