summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm2000.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-07-19 06:03:20 (GMT)
committerTakashi Iwai <tiwai@suse.de>2012-07-19 06:03:20 (GMT)
commit4609ed6b1f0ab9f11a9d0361573b53d9d057c440 (patch)
tree802119cc6ddea286bc03d56431286ac52166352e /sound/soc/codecs/wm2000.c
parent639aa4bd58582f3015ae5621b7e9e754dcb58e6b (diff)
parent409b78cc17a4a3d07a541037575da648ced99437 (diff)
downloadlinux-4609ed6b1f0ab9f11a9d0361573b53d9d057c440.tar.xz
Merge tag 'asoc-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for 3.6 This has been a pretty quiet release - very little activity in framework terms, mostly just a few new drivers and updates: - Added the ability to add and remove DAPM paths dynamically, mostly for reparenting on clock changes. - New machine drivers for Marvell Brownstone, ST-Ericsson Ux500 reference platform and ttc-dkp. - New CPU drivers for Blackfin BF6xx SPORTs in I2S mode, Marvell MMP, Synopsis Designware I2S controllers, and SPEAr DMA and S/PDIF - New CODEC drivers for Dialog DA732x, ST STA529, ST-Ericsson AB8500, TI Isabelle and Wolfson Microelectronics WM5102 and WM5110
Diffstat (limited to 'sound/soc/codecs/wm2000.c')
-rw-r--r--sound/soc/codecs/wm2000.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c
index 0418fa1..3fd5b29 100644
--- a/sound/soc/codecs/wm2000.c
+++ b/sound/soc/codecs/wm2000.c
@@ -1,7 +1,7 @@
/*
* wm2000.c -- WM2000 ALSA Soc Audio driver
*
- * Copyright 2008-2010 Wolfson Microelectronics PLC.
+ * Copyright 2008-2011 Wolfson Microelectronics PLC.
*
* Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
*
@@ -674,9 +674,39 @@ static int wm2000_resume(struct snd_soc_codec *codec)
#define wm2000_resume NULL
#endif
+static bool wm2000_readable_reg(struct device *dev, unsigned int reg)
+{
+ switch (reg) {
+ case WM2000_REG_SYS_START:
+ case WM2000_REG_SPEECH_CLARITY:
+ case WM2000_REG_SYS_WATCHDOG:
+ case WM2000_REG_ANA_VMID_PD_TIME:
+ case WM2000_REG_ANA_VMID_PU_TIME:
+ case WM2000_REG_CAT_FLTR_INDX:
+ case WM2000_REG_CAT_GAIN_0:
+ case WM2000_REG_SYS_STATUS:
+ case WM2000_REG_SYS_MODE_CNTRL:
+ case WM2000_REG_SYS_START0:
+ case WM2000_REG_SYS_START1:
+ case WM2000_REG_ID1:
+ case WM2000_REG_ID2:
+ case WM2000_REG_REVISON:
+ case WM2000_REG_SYS_CTL1:
+ case WM2000_REG_SYS_CTL2:
+ case WM2000_REG_ANC_STAT:
+ case WM2000_REG_IF_CTL:
+ return true;
+ default:
+ return false;
+ }
+}
+
static const struct regmap_config wm2000_regmap = {
.reg_bits = 8,
.val_bits = 8,
+
+ .max_register = WM2000_REG_IF_CTL,
+ .readable_reg = wm2000_readable_reg,
};
static int wm2000_probe(struct snd_soc_codec *codec)