mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
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>
This commit is contained in:
parent
414c73abfd
commit
0656f6cf6c
@ -126,9 +126,6 @@ static int tpa6130a2_power(int power)
|
|||||||
|
|
||||||
mutex_lock(&data->mutex);
|
mutex_lock(&data->mutex);
|
||||||
if (power) {
|
if (power) {
|
||||||
/* Power on */
|
|
||||||
if (data->power_gpio >= 0)
|
|
||||||
gpio_set_value(data->power_gpio, 1);
|
|
||||||
|
|
||||||
ret = regulator_enable(data->supply);
|
ret = regulator_enable(data->supply);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
@ -136,6 +133,9 @@ static int tpa6130a2_power(int power)
|
|||||||
"Failed to enable supply: %d\n", ret);
|
"Failed to enable supply: %d\n", ret);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
/* Power on */
|
||||||
|
if (data->power_gpio >= 0)
|
||||||
|
gpio_set_value(data->power_gpio, 1);
|
||||||
|
|
||||||
data->power_state = 1;
|
data->power_state = 1;
|
||||||
ret = tpa6130a2_initialize();
|
ret = tpa6130a2_initialize();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user