From d8a67c7d24339d84f32dc7084f1ff314270d9d7b Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Mon, 5 Dec 2011 17:09:11 +0800 Subject: [PATCH] --- yaml --- r: 283881 b: refs/heads/master c: aec60f51e5127fb750b66eb7905047c67372177f h: refs/heads/master i: 283879: 509f896faf5c49ea9c9f52efc01b6f1164c2d744 v: v3 --- [refs] | 2 +- trunk/sound/soc/pxa/e740_wm9705.c | 20 ++++++-------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/[refs] b/[refs] index 9dbdd53f00ab..7c769c5d0f4f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b71951d63d83194d449e8ec7b28c3f30176e8208 +refs/heads/master: aec60f51e5127fb750b66eb7905047c67372177f diff --git a/trunk/sound/soc/pxa/e740_wm9705.c b/trunk/sound/soc/pxa/e740_wm9705.c index 35ed7eb8cff2..818dc57b0b2f 100644 --- a/trunk/sound/soc/pxa/e740_wm9705.c +++ b/trunk/sound/soc/pxa/e740_wm9705.c @@ -146,29 +146,21 @@ static int __init e740_init(void) if (!machine_is_e740()) return -ENODEV; - ret = gpio_request(GPIO_E740_MIC_ON, "Mic amp"); + /* Disable audio */ + ret = gpio_request_one(GPIO_E740_MIC_ON, GPIOF_OUT_INIT_LOW, "Mic amp"); if (ret) return ret; - ret = gpio_request(GPIO_E740_AMP_ON, "Output amp"); + ret = gpio_request_one(GPIO_E740_AMP_ON, GPIOF_OUT_INIT_LOW, + "Output amp"); if (ret) goto free_mic_amp_gpio; - ret = gpio_request(GPIO_E740_WM9705_nAVDD2, "Audio power"); + ret = gpio_request_one(GPIO_E740_WM9705_nAVDD2, GPIOF_OUT_INIT_HIGH, + "Audio power"); if (ret) goto free_op_amp_gpio; - /* Disable audio */ - ret = gpio_direction_output(GPIO_E740_MIC_ON, 0); - if (ret) - goto free_apwr_gpio; - ret = gpio_direction_output(GPIO_E740_AMP_ON, 0); - if (ret) - goto free_apwr_gpio; - ret = gpio_direction_output(GPIO_E740_WM9705_nAVDD2, 1); - if (ret) - goto free_apwr_gpio; - e740_snd_device = platform_device_alloc("soc-audio", -1); if (!e740_snd_device) { ret = -ENOMEM;