aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm2000.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-05-31 09:48:07 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-03 08:06:40 -0400
commit51cc7ed3e378a60a3413a7e424f536e4dec3f39d (patch)
treecab39efb119cbb1d981ad0ade30d2c42558241b3 /sound/soc/codecs/wm2000.c
parent0561c1bf354c4a8230a1e0ada43362f54e60b2f0 (diff)
ASoC: wm2000: Add register readability information
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm2000.c')
-rw-r--r--sound/soc/codecs/wm2000.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c
index 52f0a19217c4..78a148f0a8ef 100644
--- a/sound/soc/codecs/wm2000.c
+++ b/sound/soc/codecs/wm2000.c
@@ -691,9 +691,39 @@ static int wm2000_resume(struct snd_soc_codec *codec)
691#define wm2000_resume NULL 691#define wm2000_resume NULL
692#endif 692#endif
693 693
694static bool wm2000_readable_reg(struct device *dev, unsigned int reg)
695{
696 switch (reg) {
697 case WM2000_REG_SYS_START:
698 case WM2000_REG_SPEECH_CLARITY:
699 case WM2000_REG_SYS_WATCHDOG:
700 case WM2000_REG_ANA_VMID_PD_TIME:
701 case WM2000_REG_ANA_VMID_PU_TIME:
702 case WM2000_REG_CAT_FLTR_INDX:
703 case WM2000_REG_CAT_GAIN_0:
704 case WM2000_REG_SYS_STATUS:
705 case WM2000_REG_SYS_MODE_CNTRL:
706 case WM2000_REG_SYS_START0:
707 case WM2000_REG_SYS_START1:
708 case WM2000_REG_ID1:
709 case WM2000_REG_ID2:
710 case WM2000_REG_REVISON:
711 case WM2000_REG_SYS_CTL1:
712 case WM2000_REG_SYS_CTL2:
713 case WM2000_REG_ANC_STAT:
714 case WM2000_REG_IF_CTL:
715 return true;
716 default:
717 return false;
718 }
719}
720
694static const struct regmap_config wm2000_regmap = { 721static const struct regmap_config wm2000_regmap = {
695 .reg_bits = 8, 722 .reg_bits = 8,
696 .val_bits = 8, 723 .val_bits = 8,
724
725 .max_register = WM2000_REG_IF_CTL,
726 .readable_reg = wm2000_readable_reg,
697}; 727};
698 728
699static int wm2000_probe(struct snd_soc_codec *codec) 729static int wm2000_probe(struct snd_soc_codec *codec)