Skip to content

Commit

Permalink
ASoC: tpa6130a2: Revisit power-up sequence
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jarkko Nikula authored and Liam Girdwood committed Nov 9, 2010
1 parent 414c73a commit 0656f6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sound/soc/codecs/tpa6130a2.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,16 @@ 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) {
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();
Expand Down

0 comments on commit 0656f6c

Please sign in to comment.