Skip to contentSkip to conversation

ASoC: tpa6130a2: Revisit power-up sequence

PATCH Applied Jarkko Nikula 4 participants 4 messages Nov 8, 2010 – Nov 9, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: tpa6130a2: Revisit power-up sequence

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.

---
 sound/soc/codecs/tpa6130a2.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
sound/soc/codecs/tpa6130a2.c +3 -4
index f9a92ea..9b98107 100644
@@ -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();
Signature · 1 line
1.7.2.3
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · 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.

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

Acked-by on v1 1/1
#2 lore raw
In reply to Jarkko Nikula
Quoted 8 lines · Jarkko Nikula

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.

#3 lore raw
In reply to Jarkko Nikula
Quoted 6 lines · Jarkko Nikula

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.

Quoted 6 lines
---
 sound/soc/codecs/tpa6130a2.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

Applied.

Thanks

Liam

Signature · 3 lines
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk