Skip to contentSkip to conversation

ASoC: twl6040: No need to read the INTID register

PATCH Applied Peter Ujfalusi 2 participants 2 messages Sep 23, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: twl6040: No need to read the INTID register

Since our irq handler has been called, it is granted, that the reason was either PLUGINT, or UNPLUGINT.
The INTID register has been checked in the MFD part of twl6040 driver (twl6040-irq.c).
We have no reason to read from chip again here.

---
 sound/soc/codecs/twl6040.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
sound/soc/codecs/twl6040.c +2 -7
index f924827..d5c4bb4 100644
@@ -747,15 +747,10 @@ static void twl6040_accessory_work(struct work_struct *work)
 static irqreturn_t twl6040_audio_handler(int irq, void *data)
 {
 	struct snd_soc_codec *codec = data;
-	struct twl6040 *twl6040 = codec->control_data;
 	struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
-	u8 intid;
-
-	intid = twl6040_reg_read(twl6040, TWL6040_REG_INTID);
 
-	if ((intid & TWL6040_PLUGINT) || (intid & TWL6040_UNPLUGINT))
-		queue_delayed_work(priv->workqueue, &priv->delayed_work,
-							msecs_to_jiffies(200));
+	queue_delayed_work(priv->workqueue, &priv->delayed_work,
+			   msecs_to_jiffies(200));
 
 	return IRQ_HANDLED;
 }
Signature · 1 line
1.7.6.1
Applied
#1 lore raw
Quoted 5 lines · Peter Ujfalusi

Since our irq handler has been called, it is granted, that the reason was either PLUGINT, or UNPLUGINT.
The INTID register has been checked in the MFD part of twl6040 driver (twl6040-irq.c).
We have no reason to read from chip again here.

Applied, thanks.