提交 99903ea2 编写于 作者: O Olaya, Margarita 提交者: Liam Girdwood

ASoC: twl6040: Enable automatic power for phoenix 1.1

Phoenix 1.1 supports automatic power on sequence, a
verification is added to use it with new revision of
the chip.
Signed-off-by: NMargarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: NLiam Girdwood <lrg@slimlogic.co.uk>
上级 cb973d78
...@@ -1108,6 +1108,7 @@ static int twl6040_probe(struct snd_soc_codec *codec) ...@@ -1108,6 +1108,7 @@ static int twl6040_probe(struct snd_soc_codec *codec)
struct twl6040_data *priv; struct twl6040_data *priv;
int audpwron, naudint; int audpwron, naudint;
int ret = 0; int ret = 0;
u8 icrev;
priv = kzalloc(sizeof(struct twl6040_data), GFP_KERNEL); priv = kzalloc(sizeof(struct twl6040_data), GFP_KERNEL);
if (priv == NULL) if (priv == NULL)
...@@ -1116,13 +1117,17 @@ static int twl6040_probe(struct snd_soc_codec *codec) ...@@ -1116,13 +1117,17 @@ static int twl6040_probe(struct snd_soc_codec *codec)
priv->codec = codec; priv->codec = codec;
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; audpwron = twl_codec->audpwron_gpio;
naudint = twl_codec->naudint_irq; else
} else {
audpwron = -EINVAL; audpwron = -EINVAL;
if (twl_codec)
naudint = twl_codec->naudint_irq;
else
naudint = 0; naudint = 0;
}
priv->audpwron = audpwron; priv->audpwron = audpwron;
priv->naudint = naudint; priv->naudint = naudint;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册