diff options
author | Prashant Gaikwad <pgaikwad@nvidia.com> | 2012-06-05 00:29:42 -0400 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2012-06-12 12:32:56 -0400 |
commit | 65d2bdd343bd07c8de7df7352186bfe57994b5e7 (patch) | |
tree | 6c29eda6f1d3a76cae537b8579e25314121ed081 | |
parent | 61c3b1971ad4c71c99919da949ac2043dfac8ee7 (diff) |
ASoC: tegra: add clk_prepare/clk_unprepare
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>
-rw-r--r-- | sound/soc/tegra/tegra20_i2s.c | 4 | ||||
-rw-r--r-- | sound/soc/tegra/tegra20_spdif.c | 4 | ||||
-rw-r--r-- | sound/soc/tegra/tegra30_ahub.c | 8 | ||||
-rw-r--r-- | sound/soc/tegra/tegra30_i2s.c | 4 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_asoc_utils.c | 12 |
5 files changed, 16 insertions, 16 deletions
diff --git a/sound/soc/tegra/tegra20_i2s.c b/sound/soc/tegra/tegra20_i2s.c index 0c7af63d444..1647dbfe74b 100644 --- a/sound/soc/tegra/tegra20_i2s.c +++ b/sound/soc/tegra/tegra20_i2s.c | |||
@@ -62,7 +62,7 @@ static int tegra20_i2s_runtime_suspend(struct device *dev) | |||
62 | { | 62 | { |
63 | struct tegra20_i2s *i2s = dev_get_drvdata(dev); | 63 | struct tegra20_i2s *i2s = dev_get_drvdata(dev); |
64 | 64 | ||
65 | clk_disable(i2s->clk_i2s); | 65 | clk_disable_unprepare(i2s->clk_i2s); |
66 | 66 | ||
67 | return 0; | 67 | return 0; |
68 | } | 68 | } |
@@ -72,7 +72,7 @@ static int tegra20_i2s_runtime_resume(struct device *dev) | |||
72 | struct tegra20_i2s *i2s = dev_get_drvdata(dev); | 72 | struct tegra20_i2s *i2s = dev_get_drvdata(dev); |
73 | int ret; | 73 | int ret; |
74 | 74 | ||
75 | ret = clk_enable(i2s->clk_i2s); | 75 | ret = clk_prepare_enable(i2s->clk_i2s); |
76 | if (ret) { | 76 | if (ret) { |
77 | dev_err(dev, "clk_enable failed: %d\n", ret); | 77 | dev_err(dev, "clk_enable failed: %d\n", ret); |
78 | return ret; | 78 | return ret; |
diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c index f9b57418bd0..2262e4fdec2 100644 --- a/sound/soc/tegra/tegra20_spdif.c +++ b/sound/soc/tegra/tegra20_spdif.c | |||
@@ -54,7 +54,7 @@ static int tegra20_spdif_runtime_suspend(struct device *dev) | |||
54 | { | 54 | { |
55 | struct tegra20_spdif *spdif = dev_get_drvdata(dev); | 55 | struct tegra20_spdif *spdif = dev_get_drvdata(dev); |
56 | 56 | ||
57 | clk_disable(spdif->clk_spdif_out); | 57 | clk_disable_unprepare(spdif->clk_spdif_out); |
58 | 58 | ||
59 | return 0; | 59 | return 0; |
60 | } | 60 | } |
@@ -64,7 +64,7 @@ static int tegra20_spdif_runtime_resume(struct device *dev) | |||
64 | struct tegra20_spdif *spdif = dev_get_drvdata(dev); | 64 | struct tegra20_spdif *spdif = dev_get_drvdata(dev); |
65 | int ret; | 65 | int ret; |
66 | 66 | ||
67 | ret = clk_enable(spdif->clk_spdif_out); | 67 | ret = clk_prepare_enable(spdif->clk_spdif_out); |
68 | if (ret) { | 68 | if (ret) { |
69 | dev_err(dev, "clk_enable failed: %d\n", ret); | 69 | dev_err(dev, "clk_enable failed: %d\n", ret); |
70 | return ret; | 70 | return ret; |
diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c index 57cd419f743..1efb822d391 100644 --- a/sound/soc/tegra/tegra30_ahub.c +++ b/sound/soc/tegra/tegra30_ahub.c | |||
@@ -56,8 +56,8 @@ static int tegra30_ahub_runtime_suspend(struct device *dev) | |||
56 | regcache_cache_only(ahub->regmap_apbif, true); | 56 | regcache_cache_only(ahub->regmap_apbif, true); |
57 | regcache_cache_only(ahub->regmap_ahub, true); | 57 | regcache_cache_only(ahub->regmap_ahub, true); |
58 | 58 | ||
59 | clk_disable(ahub->clk_apbif); | 59 | clk_disable_unprepare(ahub->clk_apbif); |
60 | clk_disable(ahub->clk_d_audio); | 60 | clk_disable_unprepare(ahub->clk_d_audio); |
61 | 61 | ||
62 | return 0; | 62 | return 0; |
63 | } | 63 | } |
@@ -77,12 +77,12 @@ static int tegra30_ahub_runtime_resume(struct device *dev) | |||
77 | { | 77 | { |
78 | int ret; | 78 | int ret; |
79 | 79 | ||
80 | ret = clk_enable(ahub->clk_d_audio); | 80 | ret = clk_prepare_enable(ahub->clk_d_audio); |
81 | if (ret) { | 81 | if (ret) { |
82 | dev_err(dev, "clk_enable d_audio failed: %d\n", ret); | 82 | dev_err(dev, "clk_enable d_audio failed: %d\n", ret); |
83 | return ret; | 83 | return ret; |
84 | } | 84 | } |
85 | ret = clk_enable(ahub->clk_apbif); | 85 | ret = clk_prepare_enable(ahub->clk_apbif); |
86 | if (ret) { | 86 | if (ret) { |
87 | dev_err(dev, "clk_enable apbif failed: %d\n", ret); | 87 | dev_err(dev, "clk_enable apbif failed: %d\n", ret); |
88 | clk_disable(ahub->clk_d_audio); | 88 | clk_disable(ahub->clk_d_audio); |
diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c index 8596032985d..d308faaae14 100644 --- a/sound/soc/tegra/tegra30_i2s.c +++ b/sound/soc/tegra/tegra30_i2s.c | |||
@@ -62,7 +62,7 @@ static int tegra30_i2s_runtime_suspend(struct device *dev) | |||
62 | 62 | ||
63 | regcache_cache_only(i2s->regmap, true); | 63 | regcache_cache_only(i2s->regmap, true); |
64 | 64 | ||
65 | clk_disable(i2s->clk_i2s); | 65 | clk_disable_unprepare(i2s->clk_i2s); |
66 | 66 | ||
67 | return 0; | 67 | return 0; |
68 | } | 68 | } |
@@ -72,7 +72,7 @@ static int tegra30_i2s_runtime_resume(struct device *dev) | |||
72 | struct tegra30_i2s *i2s = dev_get_drvdata(dev); | 72 | struct tegra30_i2s *i2s = dev_get_drvdata(dev); |
73 | int ret; | 73 | int ret; |
74 | 74 | ||
75 | ret = clk_enable(i2s->clk_i2s); | 75 | ret = clk_prepare_enable(i2s->clk_i2s); |
76 | if (ret) { | 76 | if (ret) { |
77 | dev_err(dev, "clk_enable failed: %d\n", ret); | 77 | dev_err(dev, "clk_enable failed: %d\n", ret); |
78 | return ret; | 78 | return ret; |
diff --git a/sound/soc/tegra/tegra_asoc_utils.c b/sound/soc/tegra/tegra_asoc_utils.c index 9515ce58ea0..6872c77a119 100644 --- a/sound/soc/tegra/tegra_asoc_utils.c +++ b/sound/soc/tegra/tegra_asoc_utils.c | |||
@@ -69,9 +69,9 @@ int tegra_asoc_utils_set_rate(struct tegra_asoc_utils_data *data, int srate, | |||
69 | data->set_baseclock = 0; | 69 | data->set_baseclock = 0; |
70 | data->set_mclk = 0; | 70 | data->set_mclk = 0; |
71 | 71 | ||
72 | clk_disable(data->clk_cdev1); | 72 | clk_disable_unprepare(data->clk_cdev1); |
73 | clk_disable(data->clk_pll_a_out0); | 73 | clk_disable_unprepare(data->clk_pll_a_out0); |
74 | clk_disable(data->clk_pll_a); | 74 | clk_disable_unprepare(data->clk_pll_a); |
75 | 75 | ||
76 | err = clk_set_rate(data->clk_pll_a, new_baseclock); | 76 | err = clk_set_rate(data->clk_pll_a, new_baseclock); |
77 | if (err) { | 77 | if (err) { |
@@ -87,19 +87,19 @@ int tegra_asoc_utils_set_rate(struct tegra_asoc_utils_data *data, int srate, | |||
87 | 87 | ||
88 | /* Don't set cdev1/extern1 rate; it's locked to pll_a_out0 */ | 88 | /* Don't set cdev1/extern1 rate; it's locked to pll_a_out0 */ |
89 | 89 | ||
90 | err = clk_enable(data->clk_pll_a); | 90 | err = clk_prepare_enable(data->clk_pll_a); |
91 | if (err) { | 91 | if (err) { |
92 | dev_err(data->dev, "Can't enable pll_a: %d\n", err); | 92 | dev_err(data->dev, "Can't enable pll_a: %d\n", err); |
93 | return err; | 93 | return err; |
94 | } | 94 | } |
95 | 95 | ||
96 | err = clk_enable(data->clk_pll_a_out0); | 96 | err = clk_prepare_enable(data->clk_pll_a_out0); |
97 | if (err) { | 97 | if (err) { |
98 | dev_err(data->dev, "Can't enable pll_a_out0: %d\n", err); | 98 | dev_err(data->dev, "Can't enable pll_a_out0: %d\n", err); |
99 | return err; | 99 | return err; |
100 | } | 100 | } |
101 | 101 | ||
102 | err = clk_enable(data->clk_cdev1); | 102 | err = clk_prepare_enable(data->clk_cdev1); |
103 | if (err) { | 103 | if (err) { |
104 | dev_err(data->dev, "Can't enable cdev1: %d\n", err); | 104 | dev_err(data->dev, "Can't enable cdev1: %d\n", err); |
105 | return err; | 105 | return err; |