Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283711
b: refs/heads/master
c: d9b5e9c
h: refs/heads/master
i:
  283709: 7797ed4
  283707: 19cc6e5
  283703: 9cc041e
  283695: 4e25dfe
  283679: 76b2663
  283647: 0f6bd03
v: v3
  • Loading branch information
Mark Brown committed Nov 10, 2011
1 parent 86c2829 commit 26573e3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c9016a7937122b72d87ff2037664b7bd717d3e4b
refs/heads/master: d9b5e9c6bccc3850b91ddaac11b49f2510375f5b
36 changes: 18 additions & 18 deletions trunk/sound/soc/codecs/wm5100.c
Original file line number Diff line number Diff line change
Expand Up @@ -2467,24 +2467,6 @@ static int wm5100_probe(struct snd_soc_codec *codec)
snd_soc_update_bits(codec, wm5100_dig_vu[i], WM5100_OUT_VU,
WM5100_OUT_VU);

for (i = 0; i < ARRAY_SIZE(wm5100->pdata.in_mode); i++) {
snd_soc_update_bits(codec, WM5100_IN1L_CONTROL,
WM5100_IN1_MODE_MASK |
WM5100_IN1_DMIC_SUP_MASK,
(wm5100->pdata.in_mode[i] <<
WM5100_IN1_MODE_SHIFT) |
(wm5100->pdata.dmic_sup[i] <<
WM5100_IN1_DMIC_SUP_SHIFT));
}

for (i = 0; i < ARRAY_SIZE(wm5100->pdata.gpio_defaults); i++) {
if (!wm5100->pdata.gpio_defaults[i])
continue;

snd_soc_write(codec, WM5100_GPIO_CTRL_1 + i,
wm5100->pdata.gpio_defaults[i]);
}

/* Don't debounce interrupts to support use of SYSCLK only */
snd_soc_write(codec, WM5100_IRQ_DEBOUNCE_1, 0);
snd_soc_write(codec, WM5100_IRQ_DEBOUNCE_2, 0);
Expand Down Expand Up @@ -2739,6 +2721,24 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c,

wm5100_init_gpio(i2c);

for (i = 0; i < ARRAY_SIZE(wm5100->pdata.gpio_defaults); i++) {
if (!wm5100->pdata.gpio_defaults[i])
continue;

regmap_write(wm5100->regmap, WM5100_GPIO_CTRL_1 + i,
wm5100->pdata.gpio_defaults[i]);
}

for (i = 0; i < ARRAY_SIZE(wm5100->pdata.in_mode); i++) {
regmap_update_bits(wm5100->regmap, WM5100_IN1L_CONTROL,
WM5100_IN1_MODE_MASK |
WM5100_IN1_DMIC_SUP_MASK,
(wm5100->pdata.in_mode[i] <<
WM5100_IN1_MODE_SHIFT) |
(wm5100->pdata.dmic_sup[i] <<
WM5100_IN1_DMIC_SUP_SHIFT));
}

ret = snd_soc_register_codec(&i2c->dev,
&soc_codec_dev_wm5100, wm5100_dai,
ARRAY_SIZE(wm5100_dai));
Expand Down

0 comments on commit 26573e3

Please sign in to comment.