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

ASoC: twl6040: Modify the IRQ handler

Multiples interrupts can be received. The irq handler is modified
to attend all of them.
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>
上级 0dec1ec7
...@@ -441,30 +441,24 @@ static irqreturn_t twl6040_naudint_handler(int irq, void *data) ...@@ -441,30 +441,24 @@ static irqreturn_t twl6040_naudint_handler(int irq, void *data)
twl_i2c_read_u8(TWL_MODULE_AUDIO_VOICE, &intid, TWL6040_REG_INTID); twl_i2c_read_u8(TWL_MODULE_AUDIO_VOICE, &intid, TWL6040_REG_INTID);
switch (intid) { if (intid & TWL6040_THINT)
case TWL6040_THINT:
dev_alert(codec->dev, "die temp over-limit detection\n"); dev_alert(codec->dev, "die temp over-limit detection\n");
break;
case TWL6040_PLUGINT: if ((intid & TWL6040_PLUGINT) || (intid & TWL6040_UNPLUGINT))
case TWL6040_UNPLUGINT:
queue_delayed_work(priv->workqueue, &priv->delayed_work, queue_delayed_work(priv->workqueue, &priv->delayed_work,
msecs_to_jiffies(200)); msecs_to_jiffies(200));
break;
case TWL6040_HOOKINT: if (intid & TWL6040_HOOKINT)
break; dev_info(codec->dev, "hook detection\n");
case TWL6040_HFINT:
if (intid & TWL6040_HFINT)
dev_alert(codec->dev, "hf drivers over current detection\n"); dev_alert(codec->dev, "hf drivers over current detection\n");
break;
case TWL6040_VIBINT: if (intid & TWL6040_VIBINT)
dev_alert(codec->dev, "vib drivers over current detection\n"); dev_alert(codec->dev, "vib drivers over current detection\n");
break;
case TWL6040_READYINT: if (intid & TWL6040_READYINT)
complete(&priv->ready); complete(&priv->ready);
break;
default:
dev_err(codec->dev, "unknown audio interrupt %d\n", intid);
break;
}
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册