* [PATCH 09/15] ASoC: twl6040: Enable automatic power for phoenix 1.1
@ 2010-12-07 0:18 Olaya, Margarita
2010-12-07 13:28 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Olaya, Margarita @ 2010-12-07 0:18 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood; +Cc: alsa-devel@alsa-project.org
Phoenix 1.1 supports automatic power on sequence, a
verification is added to use it with new revision of
the chip.
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
---
sound/soc/codecs/twl6040.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index d92fb6d..0079e12 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -1101,19 +1101,24 @@ static int twl6040_probe(struct snd_soc_codec *codec)
struct twl6040_data *priv;
int audpwron, naudint;
int ret = 0;
+ u8 icrev;
priv = kzalloc(sizeof(struct twl6040_data), GFP_KERNEL);
if (priv == NULL)
return -ENOMEM;
snd_soc_codec_set_drvdata(codec, priv);
- if (twl_codec) {
+ twl_i2c_read_u8(TWL_MODULE_AUDIO_VOICE, &icrev, TWL6040_REG_ASICREV);
+
+ if (twl_codec && (icrev > 0))
audpwron = twl_codec->audpwron_gpio;
- naudint = twl_codec->naudint_irq;
- } else {
+ else
audpwron = -EINVAL;
+
+ if (twl_codec)
+ naudint = twl_codec->naudint_irq;
+ else
naudint = 0;
- }
priv->audpwron = audpwron;
priv->naudint = naudint;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-07 13:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-07 0:18 [PATCH 09/15] ASoC: twl6040: Enable automatic power for phoenix 1.1 Olaya, Margarita
2010-12-07 13:28 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.