aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm5100.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-09 07:00:22 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-09 07:00:22 -0500
commita08a499aa3d85b605b5669cfc82b8e14232f7e91 (patch)
treefd82da95552c996e9522a068ec77eae3a5ac6eec /sound/soc/codecs/wm5100.c
parent6d70934a0248d0d92e01116807c02c00ae172299 (diff)
parentd65b4e98d7ea3038b767b70fe8be959b2913f16d (diff)
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)
2053 if (wm5100->jack_detecting) { 2053 if (wm5100->jack_detecting) {
2054 dev_dbg(wm5100->dev, "Microphone detected\n"); 2054 dev_dbg(wm5100->dev, "Microphone detected\n");
2055 wm5100->jack_mic = true; 2055 wm5100->jack_mic = true;
2056 wm5100->jack_detecting = false;
2056 snd_soc_jack_report(wm5100->jack, 2057 snd_soc_jack_report(wm5100->jack,
2057 SND_JACK_HEADSET, 2058 SND_JACK_HEADSET,
2058 SND_JACK_HEADSET | SND_JACK_BTN_0); 2059 SND_JACK_HEADSET | SND_JACK_BTN_0);
@@ -2429,6 +2430,13 @@ static const struct regmap_config wm5100_regmap = {
2429 .cache_type = REGCACHE_RBTREE, 2430 .cache_type = REGCACHE_RBTREE,
2430}; 2431};
2431 2432
2433static const unsigned int wm5100_mic_ctrl_reg[] = {
2434 WM5100_IN1L_CONTROL,
2435 WM5100_IN2L_CONTROL,
2436 WM5100_IN3L_CONTROL,
2437 WM5100_IN4L_CONTROL,
2438};
2439
2432static __devinit int wm5100_i2c_probe(struct i2c_client *i2c, 2440static __devinit int wm5100_i2c_probe(struct i2c_client *i2c,
2433 const struct i2c_device_id *id) 2441 const struct i2c_device_id *id)
2434{ 2442{
@@ -2559,7 +2567,7 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c,
2559 } 2567 }
2560 2568
2561 for (i = 0; i < ARRAY_SIZE(wm5100->pdata.in_mode); i++) { 2569 for (i = 0; i < ARRAY_SIZE(wm5100->pdata.in_mode); i++) {
2562 regmap_update_bits(wm5100->regmap, WM5100_IN1L_CONTROL, 2570 regmap_update_bits(wm5100->regmap, wm5100_mic_ctrl_reg[i],
2563 WM5100_IN1_MODE_MASK | 2571 WM5100_IN1_MODE_MASK |
2564 WM5100_IN1_DMIC_SUP_MASK, 2572 WM5100_IN1_DMIC_SUP_MASK,
2565 (wm5100->pdata.in_mode[i] << 2573 (wm5100->pdata.in_mode[i] <<