[alsa-devel] [PATCH 15/15] ASoC: mxs-saif: Use clk_prepare_enable/clk_disable_unprepare
Fabio Estevam
festevam at gmail.com
Sat May 26 01:14:56 CEST 2012
From: Fabio Estevam <fabio.estevam at freescale.com>
Prepare the clock before enabling it.
Cc: Mark Brown <broonie at opensource.wolfsonmicro.com>
Cc: <alsa-devel at alsa-project.org>
Signed-off-by: Fabio Estevam <fabio.estevam at 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
More information about the Alsa-devel
mailing list