Skip to content

Commit

Permalink
ASoC: Display the power register in DAPM widget debugfs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Dec 4, 2009
1 parent dd1b3d5 commit d033c36
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d033c36

Please sign in to comment.