diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-05-12 14:07:39 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-05-12 14:09:03 -0400 |
commit | 010187fb45368470177b4d42916856f22a08a824 (patch) | |
tree | bcf8b3c77845047673b8c78feec33fb98ca27806 | |
parent | bc2716fb5a3bb05abc81c5c4c367cca99854fb9b (diff) |
ASoC: jz4740-i2s: Use clk_prepare_enable/clk_disable_unprepare
In preparation to switching the jz4740 clk driver to the common clk framework
update the clk enable/disable calls to clk_prepare_enable/clk_disable_unprepare.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | sound/soc/jz4740/jz4740-i2s.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/soc/jz4740/jz4740-i2s.c b/sound/soc/jz4740/jz4740-i2s.c index cafc6eda0ac5..4c849a49c72a 100644 --- a/sound/soc/jz4740/jz4740-i2s.c +++ b/sound/soc/jz4740/jz4740-i2s.c | |||
@@ -118,7 +118,7 @@ static int jz4740_i2s_startup(struct snd_pcm_substream *substream, | |||
118 | ctrl |= JZ_AIC_CTRL_FLUSH; | 118 | ctrl |= JZ_AIC_CTRL_FLUSH; |
119 | jz4740_i2s_write(i2s, JZ_REG_AIC_CTRL, ctrl); | 119 | jz4740_i2s_write(i2s, JZ_REG_AIC_CTRL, ctrl); |
120 | 120 | ||
121 | clk_enable(i2s->clk_i2s); | 121 | clk_prepare_enable(i2s->clk_i2s); |
122 | 122 | ||
123 | conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF); | 123 | conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF); |
124 | conf |= JZ_AIC_CONF_ENABLE; | 124 | conf |= JZ_AIC_CONF_ENABLE; |
@@ -140,7 +140,7 @@ static void jz4740_i2s_shutdown(struct snd_pcm_substream *substream, | |||
140 | conf &= ~JZ_AIC_CONF_ENABLE; | 140 | conf &= ~JZ_AIC_CONF_ENABLE; |
141 | jz4740_i2s_write(i2s, JZ_REG_AIC_CONF, conf); | 141 | jz4740_i2s_write(i2s, JZ_REG_AIC_CONF, conf); |
142 | 142 | ||
143 | clk_disable(i2s->clk_i2s); | 143 | clk_disable_unprepare(i2s->clk_i2s); |
144 | } | 144 | } |
145 | 145 | ||
146 | static int jz4740_i2s_trigger(struct snd_pcm_substream *substream, int cmd, | 146 | static int jz4740_i2s_trigger(struct snd_pcm_substream *substream, int cmd, |
@@ -314,10 +314,10 @@ static int jz4740_i2s_suspend(struct snd_soc_dai *dai) | |||
314 | conf &= ~JZ_AIC_CONF_ENABLE; | 314 | conf &= ~JZ_AIC_CONF_ENABLE; |
315 | jz4740_i2s_write(i2s, JZ_REG_AIC_CONF, conf); | 315 | jz4740_i2s_write(i2s, JZ_REG_AIC_CONF, conf); |
316 | 316 | ||
317 | clk_disable(i2s->clk_i2s); | 317 | clk_disable_unprepare(i2s->clk_i2s); |
318 | } | 318 | } |
319 | 319 | ||
320 | clk_disable(i2s->clk_aic); | 320 | clk_disable_unprepare(i2s->clk_aic); |
321 | 321 | ||
322 | return 0; | 322 | return 0; |
323 | } | 323 | } |
@@ -327,10 +327,10 @@ static int jz4740_i2s_resume(struct snd_soc_dai *dai) | |||
327 | struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); | 327 | struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); |
328 | uint32_t conf; | 328 | uint32_t conf; |
329 | 329 | ||
330 | clk_enable(i2s->clk_aic); | 330 | clk_prepare_enable(i2s->clk_aic); |
331 | 331 | ||
332 | if (dai->active) { | 332 | if (dai->active) { |
333 | clk_enable(i2s->clk_i2s); | 333 | clk_prepare_enable(i2s->clk_i2s); |
334 | 334 | ||
335 | conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF); | 335 | conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF); |
336 | conf |= JZ_AIC_CONF_ENABLE; | 336 | conf |= JZ_AIC_CONF_ENABLE; |
@@ -368,7 +368,7 @@ static int jz4740_i2s_dai_probe(struct snd_soc_dai *dai) | |||
368 | struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); | 368 | struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); |
369 | uint32_t conf; | 369 | uint32_t conf; |
370 | 370 | ||
371 | clk_enable(i2s->clk_aic); | 371 | clk_prepare_enable(i2s->clk_aic); |
372 | 372 | ||
373 | jz4740_i2c_init_pcm_config(i2s); | 373 | jz4740_i2c_init_pcm_config(i2s); |
374 | 374 | ||
@@ -388,7 +388,7 @@ static int jz4740_i2s_dai_remove(struct snd_soc_dai *dai) | |||
388 | { | 388 | { |
389 | struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); | 389 | struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); |
390 | 390 | ||
391 | clk_disable(i2s->clk_aic); | 391 | clk_disable_unprepare(i2s->clk_aic); |
392 | return 0; | 392 | return 0; |
393 | } | 393 | } |
394 | 394 | ||