From: Ulf Hansson <ulf.hansson@stericsson.com>
To: Liam Girdwood <lrg@ti.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
<alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
Linus Walleij <linus.walleij@linaro.org>,
Lee Jones <lee.jones@linaro.org>,
Ola Lilja <ola.o.lilja@stericsson.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Subject: [PATCH 1/2] ASoC: Ux500: Fixup use of clocks
Date: Mon, 22 Oct 2012 14:32:04 +0200 [thread overview]
Message-ID: <1350909125-20189-1-git-send-email-ulf.hansson@stericsson.com> (raw)
From: Ulf Hansson <ulf.hansson@linaro.org>
Make sure clocks are being prepared and unprepared as well
as enabled and disabled.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
sound/soc/ux500/ux500_msp_dai.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c
index be94bf9..e11187f 100644
--- a/sound/soc/ux500/ux500_msp_dai.c
+++ b/sound/soc/ux500/ux500_msp_dai.c
@@ -398,11 +398,13 @@ static int ux500_msp_dai_startup(struct snd_pcm_substream *substream,
return ret;
}
- /* Enable clock */
+ /* Prepare and enable clock */
dev_dbg(dai->dev, "%s: Enabling MSP-clock.\n", __func__);
- clk_enable(drvdata->clk);
+ ret = clk_prepare_enable(drvdata->clk);
+ if (ret)
+ regulator_disable(drvdata->reg_vape);
- return 0;
+ return ret;
}
static void ux500_msp_dai_shutdown(struct snd_pcm_substream *substream,
@@ -428,8 +430,8 @@ static void ux500_msp_dai_shutdown(struct snd_pcm_substream *substream,
__func__, dai->id, snd_pcm_stream_str(substream));
}
- /* Disable clock */
- clk_disable(drvdata->clk);
+ /* Disable and unprepare clock */
+ clk_disable_unprepare(drvdata->clk);
/* Disable regulator */
ret = regulator_disable(drvdata->reg_vape);
--
1.7.10
next reply other threads:[~2012-10-22 12:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-22 12:32 Ulf Hansson [this message]
2012-10-22 12:32 ` [PATCH 2/2] ASoC: Ux500: Control apb clock Ulf Hansson
2012-10-22 13:20 ` Linus Walleij
2012-10-22 13:32 ` Mark Brown
2012-10-22 14:07 ` Ulf Hansson
2012-10-22 13:19 ` [PATCH 1/2] ASoC: Ux500: Fixup use of clocks Linus Walleij
2012-10-22 13:30 ` Mark Brown
2012-11-05 14:27 ` Ulf Hansson
2012-11-06 8:26 ` 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=1350909125-20189-1-git-send-email-ulf.hansson@stericsson.com \
--to=ulf.hansson@stericsson.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
--cc=ola.o.lilja@stericsson.com \
--cc=ulf.hansson@linaro.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
all inboxes | Powered by JetHome®