* [PATCH v2 2/2] ASoC: kirkwood: fix loss of external clock at probe time
@ 2013-09-21 10:00 Jean-Francois Moine
2013-09-21 13:36 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Jean-Francois Moine @ 2013-09-21 10:00 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown
Cc: Jaroslav Kysela, Takashi Iwai, Grant Likely, Rob Herring,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mike Turquette,
Russell King
At probe time, when the clock driver is not yet initialized, the
external clock of the kirkwood sound device will not be usable.
This patch fixes this problem defering the device probe.
Signed-off-by: Jean-Francois Moine <moinejf-GANU6spQydw@public.gmane.org>
---
sound/soc/kirkwood/kirkwood-i2s.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
index 0f3d73d..14f32d9 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c
+++ b/sound/soc/kirkwood/kirkwood-i2s.c
@@ -496,7 +496,10 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
return err;
priv->extclk = devm_clk_get(&pdev->dev, "extclk");
- if (!IS_ERR(priv->extclk)) {
+ if (IS_ERR(priv->extclk)) {
+ if (PTR_ERR(priv->extclk) == -EPROBE_DEFER)
+ return -EPROBE_DEFER;
+ } else {
if (priv->extclk == priv->clk) {
devm_clk_put(&pdev->dev, priv->extclk);
priv->extclk = ERR_PTR(-EINVAL);
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 2/2] ASoC: kirkwood: fix loss of external clock at probe time
2013-09-21 10:00 [PATCH v2 2/2] ASoC: kirkwood: fix loss of external clock at probe time Jean-Francois Moine
@ 2013-09-21 13:36 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-09-21 13:36 UTC (permalink / raw)
To: Jean-Francois Moine
Cc: devicetree, alsa-devel, Mike Turquette, Takashi Iwai,
Liam Girdwood, Rob Herring, Grant Likely, Russell King,
linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 476 bytes --]
On Sat, Sep 21, 2013 at 12:00:36PM +0200, Jean-Francois Moine wrote:
> At probe time, when the clock driver is not yet initialized, the
> external clock of the kirkwood sound device will not be usable.
>
> This patch fixes this problem defering the device probe.
Applied, thanks. It won't do anything without a version of patch 1 but
there's no build time dependency and it seems like we should get a fix
into the core for the unspecified vs unregistered problem.
[-- 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] 2+ messages in thread
end of thread, other threads:[~2013-09-21 13:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-21 10:00 [PATCH v2 2/2] ASoC: kirkwood: fix loss of external clock at probe time Jean-Francois Moine
2013-09-21 13:36 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).