ASoC: tegra: add clk_prepare/clk_unprepare
authorPrashant Gaikwad <pgaikwad@nvidia.com>
Tue, 5 Jun 2012 04:29:42 +0000 (09:59 +0530)
committerStephen Warren <swarren@nvidia.com>
Tue, 12 Jun 2012 16:32:56 +0000 (10:32 -0600)
Use clk_prepare/clk_unprepare as required by the generic clk framework.

Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/tegra/tegra20_i2s.c
sound/soc/tegra/tegra20_spdif.c
sound/soc/tegra/tegra30_ahub.c
sound/soc/tegra/tegra30_i2s.c
sound/soc/tegra/tegra_asoc_utils.c

index 0c7af63d444b4ba42f8305a8d12392668718e624..1647dbfe74b5f7dd324331ae5d92e8dc4e5b1740 100644 (file)
@@ -62,7 +62,7 @@ static int tegra20_i2s_runtime_suspend(struct device *dev)
 {
        struct tegra20_i2s *i2s = dev_get_drvdata(dev);
 
-       clk_disable(i2s->clk_i2s);
+       clk_disable_unprepare(i2s->clk_i2s);
 
        return 0;
 }
@@ -72,7 +72,7 @@ static int tegra20_i2s_runtime_resume(struct device *dev)
        struct tegra20_i2s *i2s = dev_get_drvdata(dev);
        int ret;
 
-       ret = clk_enable(i2s->clk_i2s);
+       ret = clk_prepare_enable(i2s->clk_i2s);
        if (ret) {
                dev_err(dev, "clk_enable failed: %d\n", ret);
                return ret;
index f9b57418bd088c42f83f7e4bfde699dd7407298d..2262e4fdec2af6f2fc85edb65c3f1cf180643a2c 100644 (file)
@@ -54,7 +54,7 @@ static int tegra20_spdif_runtime_suspend(struct device *dev)
 {
        struct tegra20_spdif *spdif = dev_get_drvdata(dev);
 
-       clk_disable(spdif->clk_spdif_out);
+       clk_disable_unprepare(spdif->clk_spdif_out);
 
        return 0;
 }
@@ -64,7 +64,7 @@ static int tegra20_spdif_runtime_resume(struct device *dev)
        struct tegra20_spdif *spdif = dev_get_drvdata(dev);
        int ret;
 
-       ret = clk_enable(spdif->clk_spdif_out);
+       ret = clk_prepare_enable(spdif->clk_spdif_out);
        if (ret) {
                dev_err(dev, "clk_enable failed: %d\n", ret);
                return ret;
index 57cd419f743ec5ee7a84f24ed0ad9532de01fd6a..1efb822d39166cfb479e645aa17748732281e465 100644 (file)
@@ -56,8 +56,8 @@ static int tegra30_ahub_runtime_suspend(struct device *dev)
        regcache_cache_only(ahub->regmap_apbif, true);
        regcache_cache_only(ahub->regmap_ahub, true);
 
-       clk_disable(ahub->clk_apbif);
-       clk_disable(ahub->clk_d_audio);
+       clk_disable_unprepare(ahub->clk_apbif);
+       clk_disable_unprepare(ahub->clk_d_audio);
 
        return 0;
 }
@@ -77,12 +77,12 @@ static int tegra30_ahub_runtime_resume(struct device *dev)
 {
        int ret;
 
-       ret = clk_enable(ahub->clk_d_audio);
+       ret = clk_prepare_enable(ahub->clk_d_audio);
        if (ret) {
                dev_err(dev, "clk_enable d_audio failed: %d\n", ret);
                return ret;
        }
-       ret = clk_enable(ahub->clk_apbif);
+       ret = clk_prepare_enable(ahub->clk_apbif);
        if (ret) {
                dev_err(dev, "clk_enable apbif failed: %d\n", ret);
                clk_disable(ahub->clk_d_audio);
index 8596032985dc790e7ca07fc637fd11c36f210cf8..d308faaae148e36fcf83ae8beab5f4abce9ff08d 100644 (file)
@@ -62,7 +62,7 @@ static int tegra30_i2s_runtime_suspend(struct device *dev)
 
        regcache_cache_only(i2s->regmap, true);
 
-       clk_disable(i2s->clk_i2s);
+       clk_disable_unprepare(i2s->clk_i2s);
 
        return 0;
 }
@@ -72,7 +72,7 @@ static int tegra30_i2s_runtime_resume(struct device *dev)
        struct tegra30_i2s *i2s = dev_get_drvdata(dev);
        int ret;
 
-       ret = clk_enable(i2s->clk_i2s);
+       ret = clk_prepare_enable(i2s->clk_i2s);
        if (ret) {
                dev_err(dev, "clk_enable failed: %d\n", ret);
                return ret;
index 9515ce58ea022a11f059edd9f7163ca1b95a1a04..6872c77a1196e948de6827c88581120ec19064f3 100644 (file)
@@ -69,9 +69,9 @@ int tegra_asoc_utils_set_rate(struct tegra_asoc_utils_data *data, int srate,
        data->set_baseclock = 0;
        data->set_mclk = 0;
 
-       clk_disable(data->clk_cdev1);
-       clk_disable(data->clk_pll_a_out0);
-       clk_disable(data->clk_pll_a);
+       clk_disable_unprepare(data->clk_cdev1);
+       clk_disable_unprepare(data->clk_pll_a_out0);
+       clk_disable_unprepare(data->clk_pll_a);
 
        err = clk_set_rate(data->clk_pll_a, new_baseclock);
        if (err) {
@@ -87,19 +87,19 @@ int tegra_asoc_utils_set_rate(struct tegra_asoc_utils_data *data, int srate,
 
        /* Don't set cdev1/extern1 rate; it's locked to pll_a_out0 */
 
-       err = clk_enable(data->clk_pll_a);
+       err = clk_prepare_enable(data->clk_pll_a);
        if (err) {
                dev_err(data->dev, "Can't enable pll_a: %d\n", err);
                return err;
        }
 
-       err = clk_enable(data->clk_pll_a_out0);
+       err = clk_prepare_enable(data->clk_pll_a_out0);
        if (err) {
                dev_err(data->dev, "Can't enable pll_a_out0: %d\n", err);
                return err;
        }
 
-       err = clk_enable(data->clk_cdev1);
+       err = clk_prepare_enable(data->clk_cdev1);
        if (err) {
                dev_err(data->dev, "Can't enable cdev1: %d\n", err);
                return err;