aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlaya, Margarita <magi.olaya@ti.com>2010-12-10 22:05:30 -0500
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-12-14 15:36:37 -0500
commitcf370a5a0e9d3b111f93216a55f275d66daed952 (patch)
treeeaa78953a621db61b0522e6bb5214e9b56e27f2e
parent0dec1ec72317caa64f0174f8190c714ae4d51040 (diff)
ASoC: twl6040: Modify the IRQ handler
Multiples interrupts can be received. The irq handler is modified to attend all of them. 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>
-rw-r--r--sound/soc/codecs/twl6040.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index d33d2b4769f3..8a6c62339e39 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -441,30 +441,24 @@ static irqreturn_t twl6040_naudint_handler(int irq, void *data)
441 441
442 twl_i2c_read_u8(TWL_MODULE_AUDIO_VOICE, &intid, TWL6040_REG_INTID); 442 twl_i2c_read_u8(TWL_MODULE_AUDIO_VOICE, &intid, TWL6040_REG_INTID);
443 443
444 switch (intid) { 444 if (intid & TWL6040_THINT)
445 case TWL6040_THINT:
446 dev_alert(codec->dev, "die temp over-limit detection\n"); 445 dev_alert(codec->dev, "die temp over-limit detection\n");
447 break; 446
448 case TWL6040_PLUGINT: 447 if ((intid & TWL6040_PLUGINT) || (intid & TWL6040_UNPLUGINT))
449 case TWL6040_UNPLUGINT:
450 queue_delayed_work(priv->workqueue, &priv->delayed_work, 448 queue_delayed_work(priv->workqueue, &priv->delayed_work,
451 msecs_to_jiffies(200)); 449 msecs_to_jiffies(200));
452 break; 450
453 case TWL6040_HOOKINT: 451 if (intid & TWL6040_HOOKINT)
454 break; 452 dev_info(codec->dev, "hook detection\n");
455 case TWL6040_HFINT: 453
454 if (intid & TWL6040_HFINT)
456 dev_alert(codec->dev, "hf drivers over current detection\n"); 455 dev_alert(codec->dev, "hf drivers over current detection\n");
457 break; 456
458 case TWL6040_VIBINT: 457 if (intid & TWL6040_VIBINT)
459 dev_alert(codec->dev, "vib drivers over current detection\n"); 458 dev_alert(codec->dev, "vib drivers over current detection\n");
460 break; 459
461 case TWL6040_READYINT: 460 if (intid & TWL6040_READYINT)
462 complete(&priv->ready); 461 complete(&priv->ready);
463 break;
464 default:
465 dev_err(codec->dev, "unknown audio interrupt %d\n", intid);
466 break;
467 }
468 462
469 return IRQ_HANDLED; 463 return IRQ_HANDLED;
470} 464}