From 0656f6cf6c394ede78657595dd5a8ca7a1e64853 Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Mon, 8 Nov 2010 10:57:57 +0200 Subject: 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. Signed-off-by: Jarkko Nikula Cc: Peter Ujfalusi Acked-by: Peter Ujfalusi Acked-by: Mark Brown Signed-off-by: Liam Girdwood --- sound/soc/codecs/tpa6130a2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sound/soc/codecs/tpa6130a2.c') diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c index 329acc1a2074..e55317b35786 100644 --- a/sound/soc/codecs/tpa6130a2.c +++ b/sound/soc/codecs/tpa6130a2.c @@ -126,9 +126,6 @@ static int tpa6130a2_power(int power) mutex_lock(&data->mutex); if (power) { - /* Power on */ - if (data->power_gpio >= 0) - gpio_set_value(data->power_gpio, 1); ret = regulator_enable(data->supply); if (ret != 0) { @@ -136,6 +133,9 @@ static int tpa6130a2_power(int power) "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(); -- cgit v1.2.1