| OLD | NEW |
| 1 /* | 1 /* |
| 2 * tegra_asoc_utils.c - Harmony machine ASoC driver | 2 * tegra_asoc_utils.c - Harmony machine ASoC driver |
| 3 * | 3 * |
| 4 * Author: Stephen Warren <swarren@nvidia.com> | 4 * Author: Stephen Warren <swarren@nvidia.com> |
| 5 * Copyright (C) 2010 - NVIDIA, Inc. | 5 * Copyright (C) 2010 - NVIDIA, Inc. |
| 6 * | 6 * |
| 7 * This program is free software; you can redistribute it and/or | 7 * This program is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU General Public License | 8 * modify it under the terms of the GNU General Public License |
| 9 * version 2 as published by the Free Software Foundation. | 9 * version 2 as published by the Free Software Foundation. |
| 10 * | 10 * |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 if (err) { | 94 if (err) { |
| 95 dev_err(data->dev, "Can't enable cdev1: %d\n", err); | 95 dev_err(data->dev, "Can't enable cdev1: %d\n", err); |
| 96 return err; | 96 return err; |
| 97 } | 97 } |
| 98 | 98 |
| 99 data->set_baseclock = new_baseclock; | 99 data->set_baseclock = new_baseclock; |
| 100 data->set_mclk = mclk; | 100 data->set_mclk = mclk; |
| 101 | 101 |
| 102 return 0; | 102 return 0; |
| 103 } | 103 } |
| 104 EXPORT_SYMBOL_GPL(tegra_asoc_utils_set_rate); |
| 104 | 105 |
| 105 int tegra_asoc_utils_init(struct tegra_asoc_utils_data *data, | 106 int tegra_asoc_utils_init(struct tegra_asoc_utils_data *data, |
| 106 struct device *dev) | 107 struct device *dev) |
| 107 { | 108 { |
| 108 int ret; | 109 int ret; |
| 109 | 110 |
| 110 data->dev = dev; | 111 data->dev = dev; |
| 111 | 112 |
| 112 data->clk_pll_a = clk_get_sys(NULL, "pll_a"); | 113 data->clk_pll_a = clk_get_sys(NULL, "pll_a"); |
| 113 if (IS_ERR(data->clk_pll_a)) { | 114 if (IS_ERR(data->clk_pll_a)) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 132 | 133 |
| 133 return 0; | 134 return 0; |
| 134 | 135 |
| 135 err_put_pll_a_out0: | 136 err_put_pll_a_out0: |
| 136 clk_put(data->clk_pll_a_out0); | 137 clk_put(data->clk_pll_a_out0); |
| 137 err_put_pll_a: | 138 err_put_pll_a: |
| 138 clk_put(data->clk_pll_a); | 139 clk_put(data->clk_pll_a); |
| 139 err: | 140 err: |
| 140 return ret; | 141 return ret; |
| 141 } | 142 } |
| 143 EXPORT_SYMBOL_GPL(tegra_asoc_utils_init); |
| 142 | 144 |
| 143 void tegra_asoc_utils_fini(struct tegra_asoc_utils_data *data) | 145 void tegra_asoc_utils_fini(struct tegra_asoc_utils_data *data) |
| 144 { | 146 { |
| 145 clk_put(data->clk_cdev1); | 147 clk_put(data->clk_cdev1); |
| 146 clk_put(data->clk_pll_a_out0); | 148 clk_put(data->clk_pll_a_out0); |
| 147 clk_put(data->clk_pll_a); | 149 clk_put(data->clk_pll_a); |
| 148 } | 150 } |
| 151 EXPORT_SYMBOL_GPL(tegra_asoc_utils_fini); |
| 149 | 152 |
| OLD | NEW |