diff mbox

[1/4] ASoC: rsnd: call clk_prepare()/clk_enable() for AUDIO_CLKx

Message ID 87h9l2w46o.wl%kuninori.morimoto.gx@renesas.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kuninori Morimoto Nov. 4, 2015, 8:42 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ADG can output AUDIO_CLKOUTx, and these are generated from
AUDIO_CLKx. Thus we need to call clk_prepare()/clk_enable()
for AUDIO_CLKx.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/sh/rcar/adg.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Mark Brown Nov. 4, 2015, 2:49 p.m. UTC | #1
On Wed, Nov 04, 2015 at 08:42:53AM +0000, Kuninori Morimoto wrote:

> ADG can output AUDIO_CLKOUTx, and these are generated from
> AUDIO_CLKx. Thus we need to call clk_prepare()/clk_enable()
> for AUDIO_CLKx.

Don't we need some disables somewhere?

> -	for_each_rsnd_clk(clk, adg, i)
> +	for_each_rsnd_clk(clk, adg, i) {
> +		clk_prepare(clk);
> +		clk_enable(clk);

Do clk_prepare_enable() and check the error code.
diff mbox

Patch

diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
index 2a5b3a2..107812d 100644
--- a/sound/soc/sh/rcar/adg.c
+++ b/sound/soc/sh/rcar/adg.c
@@ -425,8 +425,11 @@  static void rsnd_adg_get_clkin(struct rsnd_priv *priv,
 		adg->clk[i] = IS_ERR(clk) ? NULL : clk;
 	}
 
-	for_each_rsnd_clk(clk, adg, i)
+	for_each_rsnd_clk(clk, adg, i) {
+		clk_prepare(clk);
+		clk_enable(clk);
 		dev_dbg(dev, "clk %d : %p : %ld\n", i, clk, clk_get_rate(clk));
+	}
 }
 
 static void rsnd_adg_get_clkout(struct rsnd_priv *priv,