From: Jarkko Nikula <jhnikula@gmail.com>
To: alsa-devel@alsa-project.org
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Peter Ujfalusi <peter.ujfalusi@nokia.com>,
Liam Girdwood <lrg@slimlogic.co.uk>
Subject: [PATCH] ASoC: tpa6130a2: Revisit power-up sequence
Date: Mon, 8 Nov 2010 10:57:57 +0200 [thread overview]
Message-ID: <1289206677-11886-1-git-send-email-jhnikula@gmail.com> (raw)
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>
---
sound/soc/codecs/tpa6130a2.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c
index f9a92ea..9b98107 100644
--- a/sound/soc/codecs/tpa6130a2.c
+++ b/sound/soc/codecs/tpa6130a2.c
@@ -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();
--
1.7.2.3
next reply other threads:[~2010-11-08 8:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-08 8:57 Jarkko Nikula [this message]
2010-11-08 9:38 ` [PATCH] ASoC: tpa6130a2: Revisit power-up sequence Peter Ujfalusi
2010-11-08 11:36 ` Mark Brown
2010-11-09 21:39 ` Liam Girdwood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1289206677-11886-1-git-send-email-jhnikula@gmail.com \
--to=jhnikula@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
--cc=peter.ujfalusi@nokia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).