diff mbox

[2/3] ASoC: rt298: clear IRQ at the beginning of rt298_irq

Message ID 1455613956-14287-2-git-send-email-bardliao@realtek.com (mailing list archive)
State New, archived
Headers show

Commit Message

Bard Liao Feb. 16, 2016, 9:12 a.m. UTC
The IRQ pin will go from high to low when the irq bit is clear.
To let the IRQ pin go low as early as possible, move the clear
irq bit function to the beginning of irq handler.

Signed-off-by: Bard Liao <bardliao@realtek.com>
---
 sound/soc/codecs/rt298.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Mark Brown Feb. 17, 2016, 1:20 p.m. UTC | #1
On Tue, Feb 16, 2016 at 05:12:35PM +0800, Bard Liao wrote:

> The IRQ pin will go from high to low when the irq bit is clear.
> To let the IRQ pin go low as early as possible, move the clear
> irq bit function to the beginning of irq handler.

Why is this a benefit?  We're going to mask the interrupt as long as the
interrupt handler is running anyway.
Bard Liao Feb. 24, 2016, 2:59 a.m. UTC | #2
> -----Original Message-----
> From: Mark Brown [mailto:broonie@kernel.org]
> Sent: Wednesday, February 17, 2016 9:20 PM
> To: Bard Liao
> Cc: lgirdwood@gmail.com; alsa-devel@alsa-project.org;
> lars@metafoo.de; Flove; Oder Chiou; John Lin; ramesh.babu@intel.com;
> senthilnathanx.veppur@intel.com
> Subject: Re: [PATCH 2/3] ASoC: rt298: clear IRQ at the beginning of
> rt298_irq
> 
> On Tue, Feb 16, 2016 at 05:12:35PM +0800, Bard Liao wrote:
> 
> > The IRQ pin will go from high to low when the irq bit is clear.
> > To let the IRQ pin go low as early as possible, move the clear irq bit
> > function to the beginning of irq handler.
> 
> Why is this a benefit?  We're going to mask the interrupt as long as the
> interrupt handler is running anyway.

Thanks for your reminding. There is actually no benefit on the patch.
Can you ignore this patch and apply other two patches?
Or I should send the patches again?

> 
> ------Please consider the environment before printing this e-mail.
Mark Brown Feb. 24, 2016, 3:42 a.m. UTC | #3
On Wed, Feb 24, 2016 at 02:59:23AM +0000, Bard Liao wrote:

> > Why is this a benefit?  We're going to mask the interrupt as long as the
> > interrupt handler is running anyway.

> Thanks for your reminding. There is actually no benefit on the patch.
> Can you ignore this patch and apply other two patches?
> Or I should send the patches again?

I don't seem to have this series any more, please resend anything that
wasn't applied.
diff mbox

Patch

diff --git a/sound/soc/codecs/rt298.c b/sound/soc/codecs/rt298.c
index e67ef5f..58bc134 100644
--- a/sound/soc/codecs/rt298.c
+++ b/sound/soc/codecs/rt298.c
@@ -961,11 +961,11 @@  static irqreturn_t rt298_irq(int irq, void *data)
 	bool mic = false;
 	int ret, status = 0;
 
-	ret = rt298_jack_detect(rt298, &hp, &mic);
-
 	/* Clear IRQ */
 	regmap_update_bits(rt298->regmap, RT298_IRQ_CTRL, 0x1, 0x1);
 
+	ret = rt298_jack_detect(rt298, &hp, &mic);
+
 	if (ret == 0) {
 		if (hp == true)
 			status |= SND_JACK_HEADPHONE;