alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: tpa6130a2: Revisit power-up sequence
@ 2010-11-08  8:57 Jarkko Nikula
  2010-11-08  9:38 ` Peter Ujfalusi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jarkko Nikula @ 2010-11-08  8:57 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Peter Ujfalusi, Liam Girdwood

There are no known problems with current power-up sequence which first sets
the /shutdown pin high and then enables the supply. However, swap the order
so that the device is kept in shutdown/reset mode during the supply voltage
transition since slowly rising voltages can usually cause problems if the
device is not kept in reset.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
---
 sound/soc/codecs/tpa6130a2.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c
index f9a92ea..9b98107 100644
--- a/sound/soc/codecs/tpa6130a2.c
+++ b/sound/soc/codecs/tpa6130a2.c
@@ -126,16 +126,15 @@ static int tpa6130a2_power(int power)
 
 	mutex_lock(&data->mutex);
 	if (power && !data->power_state) {
-		/* Power on */
-		if (data->power_gpio >= 0)
-			gpio_set_value(data->power_gpio, 1);
-
 		ret = regulator_enable(data->supply);
 		if (ret != 0) {
 			dev_err(&tpa6130a2_client->dev,
 				"Failed to enable supply: %d\n", ret);
 			goto exit;
 		}
+		/* Power on */
+		if (data->power_gpio >= 0)
+			gpio_set_value(data->power_gpio, 1);
 
 		data->power_state = 1;
 		ret = tpa6130a2_initialize();
-- 
1.7.2.3

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

* Re: [PATCH] ASoC: tpa6130a2: Revisit power-up sequence
  2010-11-08  8:57 [PATCH] ASoC: tpa6130a2: Revisit power-up sequence Jarkko Nikula
@ 2010-11-08  9:38 ` Peter Ujfalusi
  2010-11-08 11:36 ` Mark Brown
  2010-11-09 21:39 ` Liam Girdwood
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Ujfalusi @ 2010-11-08  9:38 UTC (permalink / raw)
  To: ext Jarkko Nikula; +Cc: alsa-devel@alsa-project.org, Mark Brown, Liam Girdwood

On Monday 08 November 2010 10:57:57 ext Jarkko Nikula wrote:
> There are no known problems with current power-up sequence which first sets
> the /shutdown pin high and then enables the supply. However, swap the order
> so that the device is kept in shutdown/reset mode during the supply voltage
> transition since slowly rising voltages can usually cause problems if the
> device is not kept in reset.
> 
> Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
> Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>

Yes, it is safer to keep the amp in reset during voltage ramp.

Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>

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

* Re: [PATCH] ASoC: tpa6130a2: Revisit power-up sequence
  2010-11-08  8:57 [PATCH] ASoC: tpa6130a2: Revisit power-up sequence Jarkko Nikula
  2010-11-08  9:38 ` Peter Ujfalusi
@ 2010-11-08 11:36 ` Mark Brown
  2010-11-09 21:39 ` Liam Girdwood
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2010-11-08 11:36 UTC (permalink / raw)
  To: Jarkko Nikula; +Cc: alsa-devel, Peter Ujfalusi, Liam Girdwood

On Mon, Nov 08, 2010 at 10:57:57AM +0200, Jarkko Nikula wrote:
> There are no known problems with current power-up sequence which first sets
> the /shutdown pin high and then enables the supply. However, swap the order
> so that the device is kept in shutdown/reset mode during the supply voltage
> transition since slowly rising voltages can usually cause problems if the
> device is not kept in reset.
> 
> Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
> Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

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

* Re: [PATCH] ASoC: tpa6130a2: Revisit power-up sequence
  2010-11-08  8:57 [PATCH] ASoC: tpa6130a2: Revisit power-up sequence Jarkko Nikula
  2010-11-08  9:38 ` Peter Ujfalusi
  2010-11-08 11:36 ` Mark Brown
@ 2010-11-09 21:39 ` Liam Girdwood
  2 siblings, 0 replies; 4+ messages in thread
From: Liam Girdwood @ 2010-11-09 21:39 UTC (permalink / raw)
  To: Jarkko Nikula; +Cc: alsa-devel, Mark Brown, Peter Ujfalusi

On Mon, 2010-11-08 at 10:57 +0200, Jarkko Nikula wrote:
> There are no known problems with current power-up sequence which first sets
> the /shutdown pin high and then enables the supply. However, swap the order
> so that the device is kept in shutdown/reset mode during the supply voltage
> transition since slowly rising voltages can usually cause problems if the
> device is not kept in reset.
> 
> Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
> Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
> ---
>  sound/soc/codecs/tpa6130a2.c |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)
> 

Applied.

Thanks

Liam
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

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

end of thread, other threads:[~2010-11-09 21:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-08  8:57 [PATCH] ASoC: tpa6130a2: Revisit power-up sequence Jarkko Nikula
2010-11-08  9:38 ` Peter Ujfalusi
2010-11-08 11:36 ` Mark Brown
2010-11-09 21:39 ` Liam Girdwood

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).