From: festevam@gmail.com (Fabio Estevam)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: mach-imx6q: Enable the codec clock earlier
Date: Fri, 7 Jun 2013 19:07:50 -0300 [thread overview]
Message-ID: <1370642870-8051-1-git-send-email-festevam@gmail.com> (raw)
From: Fabio Estevam <fabio.estevam@freescale.com>
In order sgtl5000 driver to probe successfully, we need to read its ID via I2C
,which requires that MCLK is driven prior to the I2C access.
Otherwise we get the following probe error:
sgtl5000: probe of 0-000a failed with error -5
imx-sgtl5000 sound.13: ASoC: CODEC (null) not registered
imx-sgtl5000 sound.13: snd_soc_register_card failed (-517)
platform sound.13: Driver imx-sgtl5000 requests probe deferral
Turn on MCLK sooner so that the probe can succeed.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
This issue is seen on linux-next tree
arch/arm/mach-imx/mach-imx6q.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 045e5e3..034f4d2 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -118,6 +118,7 @@ static void __init imx6q_sabrelite_cko1_setup(void)
{
struct clk *cko1_sel, *ahb, *cko1;
unsigned long rate;
+ int ret;
cko1_sel = clk_get_sys(NULL, "cko1_sel");
ahb = clk_get_sys(NULL, "ahb");
@@ -129,6 +130,9 @@ static void __init imx6q_sabrelite_cko1_setup(void)
clk_set_parent(cko1_sel, ahb);
rate = clk_round_rate(cko1, 16000000);
clk_set_rate(cko1, rate);
+ ret = clk_prepare_enable(cko1);
+ if (ret)
+ pr_err("enabling clko1 failed: %d", ret);
put_clk:
if (!IS_ERR(cko1_sel))
clk_put(cko1_sel);
--
1.8.1.2
next reply other threads:[~2013-06-07 22:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-07 22:07 Fabio Estevam [this message]
2013-06-07 22:20 ` [PATCH] ARM: mach-imx6q: Enable the codec clock earlier Russell King - ARM Linux
2013-06-07 23:16 ` Fabio Estevam
2013-06-07 23:43 ` Troy Kisky
2013-06-07 23:49 ` Fabio Estevam
2013-06-07 23:49 ` Troy Kisky
2013-06-10 9:10 ` Mark Brown
2013-06-10 9:07 ` Mark Brown
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=1370642870-8051-1-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--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).