aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-07-31 18:26:51 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-07-31 18:54:48 +0100
commit77ee09c67e051a5ebd19a53ba3945dbdc8d21b3c (patch)
tree4fa007a15bbdf43cd4bfae2bfbc44272faaf656b /sound/soc/soc-core.c
parenta1daf67d721adfecc298132550bc2967c67f764f (diff)
ASoC: Allow CODECs to flag invalid registers
This helps CODECs with sparse register maps work better with the register cache display interface. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 5eabb711760..fb8d7a76615 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1156,6 +1156,9 @@ static ssize_t soc_codec_reg_show(struct snd_soc_codec *codec, char *buf)
count += sprintf(buf, "%s registers\n", codec->name);
for (i = 0; i < codec->reg_cache_size; i += step) {
+ if (codec->readable_register && !codec->readable_register(i))
+ continue;
+
count += sprintf(buf + count, "%2x: ", i);
if (count >= PAGE_SIZE - 1)
break;