summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm5100.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-09 16:00:22 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-09 16:00:22 +0400
commita08a499aa3d85b605b5669cfc82b8e14232f7e91 (patch)
treefd82da95552c996e9522a068ec77eae3a5ac6eec /sound/soc/codecs/wm5100.c
parent6d70934a0248d0d92e01116807c02c00ae172299 (diff)
parentd65b4e98d7ea3038b767b70fe8be959b2913f16d (diff)
downloadlinux-a08a499aa3d85b605b5669cfc82b8e14232f7e91.tar.xz
Merge tag 'v3.3-rc3' as we've got several bugfixes in there which are
colliding annoyingly with development. Linux 3.3-rc3 .. the number of the half-beast? Conflicts: sound/soc/codecs/wm5100.c sound/soc/codecs/wm8994.c
Diffstat (limited to 'sound/soc/codecs/wm5100.c')
-rw-r--r--sound/soc/codecs/wm5100.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
index f6b6ea898022..2339aa0e9453 100644
--- a/sound/soc/codecs/wm5100.c
+++ b/sound/soc/codecs/wm5100.c
@@ -2053,6 +2053,7 @@ static void wm5100_micd_irq(struct wm5100_priv *wm5100)
if (wm5100->jack_detecting) {
dev_dbg(wm5100->dev, "Microphone detected\n");
wm5100->jack_mic = true;
+ wm5100->jack_detecting = false;
snd_soc_jack_report(wm5100->jack,
SND_JACK_HEADSET,
SND_JACK_HEADSET | SND_JACK_BTN_0);
@@ -2429,6 +2430,13 @@ static const struct regmap_config wm5100_regmap = {
.cache_type = REGCACHE_RBTREE,
};
+static const unsigned int wm5100_mic_ctrl_reg[] = {
+ WM5100_IN1L_CONTROL,
+ WM5100_IN2L_CONTROL,
+ WM5100_IN3L_CONTROL,
+ WM5100_IN4L_CONTROL,
+};
+
static __devinit int wm5100_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
@@ -2559,7 +2567,7 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c,
}
for (i = 0; i < ARRAY_SIZE(wm5100->pdata.in_mode); i++) {
- regmap_update_bits(wm5100->regmap, WM5100_IN1L_CONTROL,
+ regmap_update_bits(wm5100->regmap, wm5100_mic_ctrl_reg[i],
WM5100_IN1_MODE_MASK |
WM5100_IN1_DMIC_SUP_MASK,
(wm5100->pdata.in_mode[i] <<