Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316199
b: refs/heads/master
c: 51cc7ed
h: refs/heads/master
i:
  316197: 73493bb
  316195: d7dfdab
  316191: e44d201
v: v3
  • Loading branch information
Mark Brown committed Jun 3, 2012
1 parent 6e0ab7e commit 6425c1c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0561c1bf354c4a8230a1e0ada43362f54e60b2f0
refs/heads/master: 51cc7ed3e378a60a3413a7e424f536e4dec3f39d
30 changes: 30 additions & 0 deletions trunk/sound/soc/codecs/wm2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,9 +691,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)
Expand Down

0 comments on commit 6425c1c

Please sign in to comment.