Hi Prashant,<br><br><div class="gmail_quote">On Tue, Jun 5, 2012 at 9:59 AM, Prashant Gaikwad <span dir="ltr"><<a href="mailto:pgaikwad@nvidia.com" target="_blank">pgaikwad@nvidia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Use clk_prepare/clk_unprepare as required by the generic clk framework.<br>
<br>
Signed-off-by: Prashant Gaikwad <<a href="mailto:pgaikwad@nvidia.com">pgaikwad@nvidia.com</a>><br>
---<br>
Please ignore previous versions. Updated commit message and<br>
maintainers properly in this version. No other change.<br>
<br>
This patch should go through Tegra tree since other patches to port Tegra<br>
to generic clock framework are dependent on it. Posting here to get ack from<br>
the maintainers.<br>
<br>
sound/soc/tegra/tegra20_i2s.c | 4 ++--<br>
sound/soc/tegra/tegra20_spdif.c | 4 ++--<br>
sound/soc/tegra/tegra30_ahub.c | 8 ++++----<br>
sound/soc/tegra/tegra30_i2s.c | 4 ++--<br>
sound/soc/tegra/tegra_asoc_utils.c | 12 ++++++------<br>
5 files changed, 16 insertions(+), 16 deletions(-)<br>
<br>
diff --git a/sound/soc/tegra/tegra20_i2s.c b/sound/soc/tegra/tegra20_i2s.c<br>
index 0c7af63..1647dbf 100644<br>
--- a/sound/soc/tegra/tegra20_i2s.c<br>
+++ b/sound/soc/tegra/tegra20_i2s.c<br>
@@ -62,7 +62,7 @@ static int tegra20_i2s_runtime_suspend(struct device *dev)<br>
{<br>
struct tegra20_i2s *i2s = dev_get_drvdata(dev);<br>
<br>
- clk_disable(i2s->clk_i2s);<br>
+ clk_disable_unprepare(i2s->clk_i2s);<br>
<br>
return 0;<br>
}<br>
@@ -72,7 +72,7 @@ static int tegra20_i2s_runtime_resume(struct device *dev)<br>
struct tegra20_i2s *i2s = dev_get_drvdata(dev);<br>
int ret;<br>
<br>
- ret = clk_enable(i2s->clk_i2s);<br>
+ ret = clk_prepare_enable(i2s->clk_i2s);<br>
if (ret) {<br>
dev_err(dev, "clk_enable failed: %d\n", ret);<br>
return ret;<br>
diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c<br>
index f9b5741..2262e4f 100644<br>
--- a/sound/soc/tegra/tegra20_spdif.c<br>
+++ b/sound/soc/tegra/tegra20_spdif.c<br>
@@ -54,7 +54,7 @@ static int tegra20_spdif_runtime_suspend(struct device *dev)<br>
{<br>
struct tegra20_spdif *spdif = dev_get_drvdata(dev);<br>
<br>
- clk_disable(spdif->clk_spdif_out);<br>
+ clk_disable_unprepare(spdif->clk_spdif_out);<br>
<br>
return 0;<br>
}<br>
@@ -64,7 +64,7 @@ static int tegra20_spdif_runtime_resume(struct device *dev)<br>
struct tegra20_spdif *spdif = dev_get_drvdata(dev);<br>
int ret;<br>
<br>
- ret = clk_enable(spdif->clk_spdif_out);<br>
+ ret = clk_prepare_enable(spdif->clk_spdif_out);<br>
if (ret) {<br>
dev_err(dev, "clk_enable failed: %d\n", ret);<br>
return ret;<br>
diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c<br>
index 57cd419..1efb822 100644<br>
--- a/sound/soc/tegra/tegra30_ahub.c<br>
+++ b/sound/soc/tegra/tegra30_ahub.c<br>
@@ -56,8 +56,8 @@ static int tegra30_ahub_runtime_suspend(struct device *dev)<br>
regcache_cache_only(ahub->regmap_apbif, true);<br>
regcache_cache_only(ahub->regmap_ahub, true);<br>
<br>
- clk_disable(ahub->clk_apbif);<br>
- clk_disable(ahub->clk_d_audio);<br>
+ clk_disable_unprepare(ahub->clk_apbif);<br>
+ clk_disable_unprepare(ahub->clk_d_audio);<br>
<br>
return 0;<br>
}<br>
@@ -77,12 +77,12 @@ static int tegra30_ahub_runtime_resume(struct device *dev)<br>
{<br>
int ret;<br>
<br>
- ret = clk_enable(ahub->clk_d_audio);<br>
+ ret = clk_prepare_enable(ahub->clk_d_audio);<br>
if (ret) {<br>
dev_err(dev, "clk_enable d_audio failed: %d\n", ret);<br>
return ret;<br>
}<br>
- ret = clk_enable(ahub->clk_apbif);<br>
+ ret = clk_prepare_enable(ahub->clk_apbif);<br>
if (ret) {<br>
dev_err(dev, "clk_enable apbif failed: %d\n", ret);<br>
clk_disable(ahub->clk_d_audio);<br></blockquote><div> </div><div>Don't you need to make change here to "clk_disable_unprepare" ??</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c<br>
index 8596032..d308faa 100644<br>
--- a/sound/soc/tegra/tegra30_i2s.c<br>
+++ b/sound/soc/tegra/tegra30_i2s.c<br>
@@ -62,7 +62,7 @@ static int tegra30_i2s_runtime_suspend(struct device *dev)<br>
<br>
regcache_cache_only(i2s->regmap, true);<br>
<br>
- clk_disable(i2s->clk_i2s);<br>
+ clk_disable_unprepare(i2s->clk_i2s);<br>
<br>
return 0;<br>
}<br>
@@ -72,7 +72,7 @@ static int tegra30_i2s_runtime_resume(struct device *dev)<br>
struct tegra30_i2s *i2s = dev_get_drvdata(dev);<br>
int ret;<br>
<br>
- ret = clk_enable(i2s->clk_i2s);<br>
+ ret = clk_prepare_enable(i2s->clk_i2s);<br>
if (ret) {<br>
dev_err(dev, "clk_enable failed: %d\n", ret);<br>
return ret;<br>
diff --git a/sound/soc/tegra/tegra_asoc_utils.c b/sound/soc/tegra/tegra_asoc_utils.c<br>
index 9515ce5..6872c77 100644<br>
--- a/sound/soc/tegra/tegra_asoc_utils.c<br>
+++ b/sound/soc/tegra/tegra_asoc_utils.c<br>
@@ -69,9 +69,9 @@ int tegra_asoc_utils_set_rate(struct tegra_asoc_utils_data *data, int srate,<br>
data->set_baseclock = 0;<br>
data->set_mclk = 0;<br>
<br>
- clk_disable(data->clk_cdev1);<br>
- clk_disable(data->clk_pll_a_out0);<br>
- clk_disable(data->clk_pll_a);<br>
+ clk_disable_unprepare(data->clk_cdev1);<br>
+ clk_disable_unprepare(data->clk_pll_a_out0);<br>
+ clk_disable_unprepare(data->clk_pll_a);<br>
<br>
err = clk_set_rate(data->clk_pll_a, new_baseclock);<br>
if (err) {<br>
@@ -87,19 +87,19 @@ int tegra_asoc_utils_set_rate(struct tegra_asoc_utils_data *data, int srate,<br>
<br>
/* Don't set cdev1/extern1 rate; it's locked to pll_a_out0 */<br>
<br>
- err = clk_enable(data->clk_pll_a);<br>
+ err = clk_prepare_enable(data->clk_pll_a);<br>
if (err) {<br>
dev_err(data->dev, "Can't enable pll_a: %d\n", err);<br>
return err;<br>
}<br>
<br>
- err = clk_enable(data->clk_pll_a_out0);<br>
+ err = clk_prepare_enable(data->clk_pll_a_out0);<br>
if (err) {<br>
dev_err(data->dev, "Can't enable pll_a_out0: %d\n", err);<br>
return err;<br>
}<br>
<br>
- err = clk_enable(data->clk_cdev1);<br>
+ err = clk_prepare_enable(data->clk_cdev1);<br>
if (err) {<br>
dev_err(data->dev, "Can't enable cdev1: %d\n", err);<br>
return err;<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.4.1<br>
<br>
<br>
_______________________________________________<br>
linux-arm-kernel mailing list<br>
<a href="mailto:linux-arm-kernel@lists.infradead.org">linux-arm-kernel@lists.infradead.org</a><br>
<a href="http://lists.infradead.org/mailman/listinfo/linux-arm-kernel" target="_blank">http://lists.infradead.org/mailman/listinfo/linux-arm-kernel</a><br>
</font></span></blockquote></div><br>