From: Fabio Estevam <festevam@gmail.com>
To: kernel@pengutronix.de
Cc: Fabio Estevam <fabio.estevam@freescale.com>,
alsa-devel@alsa-project.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
shawn.guo@freescale.com
Subject: [PATCH 15/15] ASoC: mxs-saif: Use clk_prepare_enable/clk_disable_unprepare
Date: Fri, 25 May 2012 20:14:56 -0300 [thread overview]
Message-ID: <1337987696-31728-15-git-send-email-festevam@gmail.com> (raw)
In-Reply-To: <1337987696-31728-1-git-send-email-festevam@gmail.com>
From: Fabio Estevam <fabio.estevam@freescale.com>
Prepare the clock before enabling it.
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: <alsa-devel@alsa-project.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
sound/soc/mxs/mxs-saif.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index aba71bf..15ad61a 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -482,7 +482,7 @@ static int mxs_saif_trigger(struct snd_pcm_substream *substream, int cmd,
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
dev_dbg(cpu_dai->dev, "start\n");
- clk_enable(master_saif->clk);
+ clk_prepare_enable(master_saif->clk);
if (!master_saif->mclk_in_use)
__raw_writel(BM_SAIF_CTRL_RUN,
master_saif->base + SAIF_CTRL + MXS_SET_ADDR);
@@ -492,7 +492,7 @@ static int mxs_saif_trigger(struct snd_pcm_substream *substream, int cmd,
* itself clk for its internal basic logic to work.
*/
if (saif != master_saif) {
- clk_enable(saif->clk);
+ clk_prepare_enable(saif->clk);
__raw_writel(BM_SAIF_CTRL_RUN,
saif->base + SAIF_CTRL + MXS_SET_ADDR);
}
@@ -534,13 +534,13 @@ static int mxs_saif_trigger(struct snd_pcm_substream *substream, int cmd,
master_saif->base + SAIF_CTRL + MXS_CLR_ADDR);
udelay(delay);
}
- clk_disable(master_saif->clk);
+ clk_disable_unprepare(master_saif->clk);
if (saif != master_saif) {
__raw_writel(BM_SAIF_CTRL_RUN,
saif->base + SAIF_CTRL + MXS_CLR_ADDR);
udelay(delay);
- clk_disable(saif->clk);
+ clk_disable_unprepare(saif->clk);
}
master_saif->ongoing = 0;
--
1.7.1
next parent reply other threads:[~2012-05-25 23:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1337987696-31728-1-git-send-email-festevam@gmail.com>
2012-05-25 23:14 ` Fabio Estevam [this message]
2012-05-28 14:51 ` [PATCH 15/15] ASoC: mxs-saif: Use clk_prepare_enable/clk_disable_unprepare Mark Brown
2012-05-28 15:21 ` Fabio Estevam
2012-05-28 15:24 ` 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=1337987696-31728-15-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=fabio.estevam@freescale.com \
--cc=kernel@pengutronix.de \
--cc=shawn.guo@freescale.com \
/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