aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tpa6130a2.c
diff options
context:
space:
mode:
authorJarkko Nikula <jhnikula@gmail.com>2010-11-08 03:57:57 -0500
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-11-09 16:38:49 -0500
commit0656f6cf6c394ede78657595dd5a8ca7a1e64853 (patch)
tree0b754974d127ff56952f47f49546c030b668fa8b /sound/soc/codecs/tpa6130a2.c
parent414c73abfd0e565950f3b02336cf516147f0e104 (diff)
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 <jhnikula@gmail.com> Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/codecs/tpa6130a2.c')
-rw-r--r--sound/soc/codecs/tpa6130a2.c6
1 files changed, 3 insertions, 3 deletions
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)
126 126
127 mutex_lock(&data->mutex); 127 mutex_lock(&data->mutex);
128 if (power) { 128 if (power) {
129 /* Power on */
130 if (data->power_gpio >= 0)
131 gpio_set_value(data->power_gpio, 1);
132 129
133 ret = regulator_enable(data->supply); 130 ret = regulator_enable(data->supply);
134 if (ret != 0) { 131 if (ret != 0) {
@@ -136,6 +133,9 @@ static int tpa6130a2_power(int power)
136 "Failed to enable supply: %d\n", ret); 133 "Failed to enable supply: %d\n", ret);
137 goto exit; 134 goto exit;
138 } 135 }
136 /* Power on */
137 if (data->power_gpio >= 0)
138 gpio_set_value(data->power_gpio, 1);
139 139
140 data->power_state = 1; 140 data->power_state = 1;
141 ret = tpa6130a2_initialize(); 141 ret = tpa6130a2_initialize();