summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-dapm.c
diff options
context:
space:
mode:
authorMark Brown2009-12-04 16:25:56 +0100
committerMark Brown2009-12-04 17:07:26 +0100
commitd033c36ae5cec22c893c710cd026fb732c4086b9 (patch)
treeada47ea241f86d9007874ee150cab0daf15527c3 /sound/soc/soc-dapm.c
parentASoC: Export snd_soc_update_bits_unlocked() (diff)
downloadkernel-qcow2-linux-d033c36ae5cec22c893c710cd026fb732c4086b9.tar.gz
kernel-qcow2-linux-d033c36ae5cec22c893c710cd026fb732c4086b9.tar.xz
kernel-qcow2-linux-d033c36ae5cec22c893c710cd026fb732c4086b9.zip
ASoC: Display the power register in DAPM widget debugfs
Make it a bit easier to tie DAPM widgets in with the register map without referring to the source by including the register location controlled by the widget. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r--sound/soc/soc-dapm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 0d294ef72590..846678aa3d35 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1147,9 +1147,16 @@ static ssize_t dapm_widget_power_read_file(struct file *file,
out = is_connected_output_ep(w);
dapm_clear_walk(w->codec);
- ret = snprintf(buf, PAGE_SIZE, "%s: %s in %d out %d\n",
+ ret = snprintf(buf, PAGE_SIZE, "%s: %s in %d out %d",
w->name, w->power ? "On" : "Off", in, out);
+ if (w->reg >= 0)
+ ret += snprintf(buf + ret, PAGE_SIZE - ret,
+ " - R%d(0x%x) bit %d",
+ w->reg, w->reg, w->shift);
+
+ ret += snprintf(buf + ret, PAGE_SIZE - ret, "\n");
+
if (w->sname)
ret += snprintf(buf + ret, PAGE_SIZE - ret, " stream %s %s\n",
w->sname,