diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-03-30 23:07:17 (GMT) |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-02 22:02:11 (GMT) |
commit | cd1506736f3a77429f619ede817a119a7ff5f7e5 (patch) | |
tree | aea1a4ac264c21d87b6585ced25b83a0f573f5a5 /sound/soc | |
parent | f0cdcf3ab6c62b3f774a2af15dfa01988e7a9b02 (diff) | |
download | linux-fsl-qoriq-cd1506736f3a77429f619ede817a119a7ff5f7e5.tar.xz |
ASoC: tegra: ensure clocks are enabled when touching registers
Debugfs files could be accessed any time, so explicitly enable clocks
when reading registers to generate debugfs file content.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/tegra/tegra_i2s.c | 4 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_spdif.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/tegra/tegra_i2s.c b/sound/soc/tegra/tegra_i2s.c index 33509de..2d98c92 100644 --- a/sound/soc/tegra/tegra_i2s.c +++ b/sound/soc/tegra/tegra_i2s.c @@ -79,11 +79,15 @@ static int tegra_i2s_show(struct seq_file *s, void *unused) struct tegra_i2s *i2s = s->private; int i; + clk_enable(i2s->clk_i2s); + for (i = 0; i < ARRAY_SIZE(regs); i++) { u32 val = tegra_i2s_read(i2s, regs[i].offset); seq_printf(s, "%s = %08x\n", regs[i].name, val); } + clk_disable(i2s->clk_i2s); + return 0; } diff --git a/sound/soc/tegra/tegra_spdif.c b/sound/soc/tegra/tegra_spdif.c index 475428c..9ff2c60 100644 --- a/sound/soc/tegra/tegra_spdif.c +++ b/sound/soc/tegra/tegra_spdif.c @@ -79,11 +79,15 @@ static int tegra_spdif_show(struct seq_file *s, void *unused) struct tegra_spdif *spdif = s->private; int i; + clk_enable(spdif->clk_spdif_out); + for (i = 0; i < ARRAY_SIZE(regs); i++) { u32 val = tegra_spdif_read(spdif, regs[i].offset); seq_printf(s, "%s = %08x\n", regs[i].name, val); } + clk_disable(spdif->clk_spdif_out); + return 0; } |