diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-07-31 13:26:51 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-07-31 13:54:48 -0400 |
commit | 77ee09c67e051a5ebd19a53ba3945dbdc8d21b3c (patch) | |
tree | 4fa007a15bbdf43cd4bfae2bfbc44272faaf656b /sound/soc/soc-core.c | |
parent | a1daf67d721adfecc298132550bc2967c67f764f (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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 5eabb7117608..fb8d7a766155 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) | |||
1156 | 1156 | ||
1157 | count += sprintf(buf, "%s registers\n", codec->name); | 1157 | count += sprintf(buf, "%s registers\n", codec->name); |
1158 | for (i = 0; i < codec->reg_cache_size; i += step) { | 1158 | for (i = 0; i < codec->reg_cache_size; i += step) { |
1159 | if (codec->readable_register && !codec->readable_register(i)) | ||
1160 | continue; | ||
1161 | |||
1159 | count += sprintf(buf + count, "%2x: ", i); | 1162 | count += sprintf(buf + count, "%2x: ", i); |
1160 | if (count >= PAGE_SIZE - 1) | 1163 | if (count >= PAGE_SIZE - 1) |
1161 | break; | 1164 | break; |