aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/twl6040.c
diff options
context:
space:
mode:
authorMisael Lopez Cruz <misael.lopez@ti.com>2010-12-10 22:06:24 -0500
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-12-14 15:36:59 -0500
commit4f44ee1f494edef1fea3db20565b2e209bef6280 (patch)
tree3eab00c19262d6c2ddfea2dbdf1c91577f379feb /sound/soc/codecs/twl6040.c
parentf1f489a6aa89993892cd7b4d08f67e7e110492cb (diff)
ASoC: twl6040: Enable plug detection interrupts
Enable plug detection interrupt mask in order to get headset PLUGINT/UNPLUGINT interrupts. Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com> Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc/codecs/twl6040.c')
-rw-r--r--sound/soc/codecs/twl6040.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index f5d5f89a2216..a8ec9113cc33 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -1108,7 +1108,7 @@ static int twl6040_probe(struct snd_soc_codec *codec)
1108 struct twl6040_data *priv; 1108 struct twl6040_data *priv;
1109 int audpwron, naudint; 1109 int audpwron, naudint;
1110 int ret = 0; 1110 int ret = 0;
1111 u8 icrev; 1111 u8 icrev, intmr = TWL6040_ALLINT_MSK;
1112 1112
1113 priv = kzalloc(sizeof(struct twl6040_data), GFP_KERNEL); 1113 priv = kzalloc(sizeof(struct twl6040_data), GFP_KERNEL);
1114 if (priv == NULL) 1114 if (priv == NULL)
@@ -1154,16 +1154,12 @@ static int twl6040_probe(struct snd_soc_codec *codec)
1154 priv->codec_powered = 0; 1154 priv->codec_powered = 0;
1155 1155
1156 /* enable only codec ready interrupt */ 1156 /* enable only codec ready interrupt */
1157 twl6040_write(codec, TWL6040_REG_INTMR, 1157 intmr &= ~(TWL6040_READYMSK | TWL6040_PLUGMSK);
1158 ~TWL6040_READYMSK & TWL6040_ALLINT_MSK);
1159 1158
1160 /* reset interrupt status to allow correct power up sequence */ 1159 /* reset interrupt status to allow correct power up sequence */
1161 twl6040_read_reg_volatile(codec, TWL6040_REG_INTID); 1160 twl6040_read_reg_volatile(codec, TWL6040_REG_INTID);
1162 } else {
1163 /* no interrupts at all */
1164 twl6040_write_reg_cache(codec, TWL6040_REG_INTMR,
1165 TWL6040_ALLINT_MSK);
1166 } 1161 }
1162 twl6040_write(codec, TWL6040_REG_INTMR, intmr);
1167 1163
1168 if (naudint) { 1164 if (naudint) {
1169 /* audio interrupt */ 1165 /* audio interrupt */