Skip to content

Commit

Permalink
ASoC: twl6040: No need to read the INTID register
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Sep 23, 2011
1 parent 3b5b516 commit f34c660
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions sound/soc/codecs/twl6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,15 +740,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;
}
Expand Down

0 comments on commit f34c660

Please sign in to comment.