From: moinejf@free.fr (Jean-Francois Moine)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/2] ASoC: kirkwood: fix loss of external clock at probe time
Date: Sat, 19 Oct 2013 10:28:09 +0200 [thread overview]
Message-ID: <20131019102809.180dc4ff@armhf> (raw)
In-Reply-To: <20131018191259.GF10079@pengutronix.de>
On Fri, 18 Oct 2013 21:12:59 +0200
Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de> wrote:
> > + if (IS_ERR(priv->extclk)) {
> > + if (PTR_ERR(priv->extclk) == -EPROBE_DEFER)
> > + return -EPROBE_DEFER;
> Maybe the better logic here is:
> if (!PTR_ERR(priv->extclk) == -ENOENT)
> return PTR_ERR(priv->extclk);
>
> ?
No. This patch is associated with an other one which returns
-EPROBE_DEFER when the external clock is declared in the DT and when
the clock driver is not yet initialized. Then, the kirkwood modules
must be probed later.
For any other error, the external clock is not used, and it is not easy
to know if the error is due to the absence of external clock in the DT
or to a DT parsing error or to anything else.
> > + } else {
> > + dev_info(&pdev->dev, "found external clock\n");
> > + clk_prepare_enable(priv->extclk);
> > + soc_dai = kirkwood_i2s_dai_extclk;
> Another todo (that is already in the patched code) is that you should
> check the return value of clk_prepare_enable.
You are right, but an error at this level should not often occur...
--
Ken ar c'henta? | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
next prev parent reply other threads:[~2013-10-19 8:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-18 18:35 [PATCH v3 2/2] ASoC: kirkwood: fix loss of external clock at probe time Jean-Francois Moine
2013-10-18 19:12 ` Uwe Kleine-König
2013-10-19 8:28 ` Jean-Francois Moine [this message]
2013-10-20 8:03 ` Uwe Kleine-König
2013-10-20 16:33 ` Mark Brown
2013-10-20 16:38 ` Mark Brown
2013-10-21 7:24 ` Jean-Francois Moine
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=20131019102809.180dc4ff@armhf \
--to=moinejf@free.fr \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).