alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ASoC: Fix error handling in e800_init to free gpios
@ 2011-12-07  2:01 Axel Lin
  2011-12-07  2:03 ` [PATCH 2/3] ASoC: Convert e800_wm9712 to use gpio_request_one() Axel Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Axel Lin @ 2011-12-07  2:01 UTC (permalink / raw)
  To: alsa-devel; +Cc: Ian Molton, Mark Brown, Liam Girdwood

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/pxa/e800_wm9712.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/pxa/e800_wm9712.c b/sound/soc/pxa/e800_wm9712.c
index 6a8f38b..26e0232 100644
--- a/sound/soc/pxa/e800_wm9712.c
+++ b/sound/soc/pxa/e800_wm9712.c
@@ -136,8 +136,10 @@ static int __init e800_init(void)
 		goto free_spk_amp_gpio;
 
 	e800_snd_device = platform_device_alloc("soc-audio", -1);
-	if (!e800_snd_device)
-		return -ENOMEM;
+	if (!e800_snd_device) {
+		ret = -ENOMEM;
+		goto free_spk_amp_gpio;
+	}
 
 	platform_set_drvdata(e800_snd_device, &e800);
 	ret = platform_device_add(e800_snd_device);
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] ASoC: Convert e800_wm9712 to use gpio_request_one()
  2011-12-07  2:01 [PATCH 1/3] ASoC: Fix error handling in e800_init to free gpios Axel Lin
@ 2011-12-07  2:03 ` Axel Lin
  2011-12-07  2:04 ` [PATCH 3/3] ASoC: Convert e750_wm9705 " Axel Lin
  2011-12-07 16:14 ` [PATCH 1/3] ASoC: Fix error handling in e800_init to free gpios Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Axel Lin @ 2011-12-07  2:03 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Liam Girdwood

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/pxa/e800_wm9712.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/sound/soc/pxa/e800_wm9712.c b/sound/soc/pxa/e800_wm9712.c
index 26e0232..478ff19 100644
--- a/sound/soc/pxa/e800_wm9712.c
+++ b/sound/soc/pxa/e800_wm9712.c
@@ -119,22 +119,16 @@ static int __init e800_init(void)
 	if (!machine_is_e800())
 		return -ENODEV;
 
-	ret = gpio_request(GPIO_E800_HP_AMP_OFF,  "Headphone amp");
+	ret = gpio_request_one(GPIO_E800_HP_AMP_OFF, GPIOF_OUT_INIT_HIGH,
+			       "Headphone amp");
 	if (ret)
 		return ret;
 
-	ret = gpio_request(GPIO_E800_SPK_AMP_ON, "Speaker amp");
+	ret = gpio_request_one(GPIO_E800_SPK_AMP_ON, GPIOF_OUT_INIT_HIGH,
+			       "Speaker amp");
 	if (ret)
 		goto free_hp_amp_gpio;
 
-	ret = gpio_direction_output(GPIO_E800_HP_AMP_OFF, 1);
-	if (ret)
-		goto free_spk_amp_gpio;
-
-	ret = gpio_direction_output(GPIO_E800_SPK_AMP_ON, 1);
-	if (ret)
-		goto free_spk_amp_gpio;
-
 	e800_snd_device = platform_device_alloc("soc-audio", -1);
 	if (!e800_snd_device) {
 		ret = -ENOMEM;
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] ASoC: Convert e750_wm9705 to use gpio_request_one()
  2011-12-07  2:01 [PATCH 1/3] ASoC: Fix error handling in e800_init to free gpios Axel Lin
  2011-12-07  2:03 ` [PATCH 2/3] ASoC: Convert e800_wm9712 to use gpio_request_one() Axel Lin
@ 2011-12-07  2:04 ` Axel Lin
  2011-12-07 16:14 ` [PATCH 1/3] ASoC: Fix error handling in e800_init to free gpios Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Axel Lin @ 2011-12-07  2:04 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Liam Girdwood

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/pxa/e750_wm9705.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/sound/soc/pxa/e750_wm9705.c b/sound/soc/pxa/e750_wm9705.c
index ce5f056..55c53d1 100644
--- a/sound/soc/pxa/e750_wm9705.c
+++ b/sound/soc/pxa/e750_wm9705.c
@@ -129,22 +129,16 @@ static int __init e750_init(void)
 	if (!machine_is_e750())
 		return -ENODEV;
 
-	ret = gpio_request(GPIO_E750_HP_AMP_OFF,  "Headphone amp");
+	ret = gpio_request_one(GPIO_E750_HP_AMP_OFF, GPIOF_OUT_INIT_HIGH,
+			       "Headphone amp");
 	if (ret)
 		return ret;
 
-	ret = gpio_request(GPIO_E750_SPK_AMP_OFF, "Speaker amp");
+	ret = gpio_request_one(GPIO_E750_SPK_AMP_OFF, GPIOF_OUT_INIT_HIGH,
+			       "Speaker amp");
 	if (ret)
 		goto free_hp_amp_gpio;
 
-	ret = gpio_direction_output(GPIO_E750_HP_AMP_OFF, 1);
-	if (ret)
-		goto free_spk_amp_gpio;
-
-	ret = gpio_direction_output(GPIO_E750_SPK_AMP_OFF, 1);
-	if (ret)
-		goto free_spk_amp_gpio;
-
 	e750_snd_device = platform_device_alloc("soc-audio", -1);
 	if (!e750_snd_device) {
 		ret = -ENOMEM;
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] ASoC: Fix error handling in e800_init to free gpios
  2011-12-07  2:01 [PATCH 1/3] ASoC: Fix error handling in e800_init to free gpios Axel Lin
  2011-12-07  2:03 ` [PATCH 2/3] ASoC: Convert e800_wm9712 to use gpio_request_one() Axel Lin
  2011-12-07  2:04 ` [PATCH 3/3] ASoC: Convert e750_wm9705 " Axel Lin
@ 2011-12-07 16:14 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2011-12-07 16:14 UTC (permalink / raw)
  To: Axel Lin; +Cc: Ian Molton, alsa-devel, Liam Girdwood

On Wed, Dec 07, 2011 at 10:01:30AM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Applied all three, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-07 16:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-07  2:01 [PATCH 1/3] ASoC: Fix error handling in e800_init to free gpios Axel Lin
2011-12-07  2:03 ` [PATCH 2/3] ASoC: Convert e800_wm9712 to use gpio_request_one() Axel Lin
2011-12-07  2:04 ` [PATCH 3/3] ASoC: Convert e750_wm9705 " Axel Lin
2011-12-07 16:14 ` [PATCH 1/3] ASoC: Fix error handling in e800_init to free gpios Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).