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>
This commit is contained in:
parent
f0cdcf3ab6
commit
cd1506736f
|
@ -79,11 +79,15 @@ static int tegra_i2s_show(struct seq_file *s, void *unused)
|
||||||
struct tegra_i2s *i2s = s->private;
|
struct tegra_i2s *i2s = s->private;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
clk_enable(i2s->clk_i2s);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(regs); i++) {
|
for (i = 0; i < ARRAY_SIZE(regs); i++) {
|
||||||
u32 val = tegra_i2s_read(i2s, regs[i].offset);
|
u32 val = tegra_i2s_read(i2s, regs[i].offset);
|
||||||
seq_printf(s, "%s = %08x\n", regs[i].name, val);
|
seq_printf(s, "%s = %08x\n", regs[i].name, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clk_disable(i2s->clk_i2s);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,11 +79,15 @@ static int tegra_spdif_show(struct seq_file *s, void *unused)
|
||||||
struct tegra_spdif *spdif = s->private;
|
struct tegra_spdif *spdif = s->private;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
clk_enable(spdif->clk_spdif_out);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(regs); i++) {
|
for (i = 0; i < ARRAY_SIZE(regs); i++) {
|
||||||
u32 val = tegra_spdif_read(spdif, regs[i].offset);
|
u32 val = tegra_spdif_read(spdif, regs[i].offset);
|
||||||
seq_printf(s, "%s = %08x\n", regs[i].name, val);
|
seq_printf(s, "%s = %08x\n", regs[i].name, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clk_disable(spdif->clk_spdif_out);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue