diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-01-28 14:26:40 -0700 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-01-31 13:16:29 +0000 |
commit | d64e57cef0436833cfc9620e350ec6f5b041c9a9 (patch) | |
tree | 173c1f1bf2b87dfdc3bd7da379b9cf67e07b7906 /sound/soc/tegra/tegra_asoc_utils.h | |
parent | c244d477b7a5e0060b05d6ef90b7b29ef72a2188 (diff) |
ASoC: Tegra: utils: Don't use global variables
Instead, have the machine driver provide storage for the utility data
somehow.
For Harmony in particular, store this within struct tegra_harmony, itself
referenced by snd_soc_card's drvdata.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/tegra/tegra_asoc_utils.h')
-rw-r--r-- | sound/soc/tegra/tegra_asoc_utils.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/sound/soc/tegra/tegra_asoc_utils.h b/sound/soc/tegra/tegra_asoc_utils.h index 855f8f6e44c..bbba7afdfc2 100644 --- a/sound/soc/tegra/tegra_asoc_utils.h +++ b/sound/soc/tegra/tegra_asoc_utils.h @@ -23,9 +23,23 @@ #ifndef __TEGRA_ASOC_UTILS_H__ #define __TEGRA_ASOC_UTILS_H_ -int tegra_asoc_utils_set_rate(int srate, int mclk_rate, int *mclk_change); -int tegra_asoc_utils_init(void); -void tegra_asoc_utils_fini(void); +struct clk; +struct device; + +struct tegra_asoc_utils_data { + struct device *dev; + struct clk *clk_pll_a; + struct clk *clk_pll_a_out0; + struct clk *clk_cdev1; + int set_baseclock; + int set_mclk; +}; + +int tegra_asoc_utils_set_rate(struct tegra_asoc_utils_data *data, int srate, + int mclk, int *mclk_change); +int tegra_asoc_utils_init(struct tegra_asoc_utils_data *data, + struct device *dev); +void tegra_asoc_utils_fini(struct tegra_asoc_utils_data *data); #endif |