aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8903.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8903.c')
-rw-r--r--sound/soc/codecs/wm8903.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index 3595bd57c4eb..36952d77c271 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -1531,7 +1531,7 @@ static __devinit int wm8903_i2c_probe(struct i2c_client *i2c,
1531{ 1531{
1532 struct wm8903_priv *wm8903; 1532 struct wm8903_priv *wm8903;
1533 struct snd_soc_codec *codec; 1533 struct snd_soc_codec *codec;
1534 int ret; 1534 int ret, i;
1535 u16 val; 1535 u16 val;
1536 1536
1537 wm8903 = kzalloc(sizeof(struct wm8903_priv), GFP_KERNEL); 1537 wm8903 = kzalloc(sizeof(struct wm8903_priv), GFP_KERNEL);
@@ -1578,6 +1578,17 @@ static __devinit int wm8903_i2c_probe(struct i2c_client *i2c,
1578 1578
1579 wm8903_reset(codec); 1579 wm8903_reset(codec);
1580 1580
1581 /* Set up GPIOs */
1582 if (pdata) {
1583 for (i = 0; i < ARRAY_SIZE(pdata->gpio_cfg); i++) {
1584 if (!pdata->gpio_cfg[i])
1585 continue;
1586
1587 snd_soc_write(codec, WM8903_GPIO_CONTROL_1 + i,
1588 pdata->gpio_cfg[i] & 0xffff);
1589 }
1590 }
1591
1581 /* power on device */ 1592 /* power on device */
1582 wm8903_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 1593 wm8903_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
1583 1594