All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: nau8825: set clear_irq when imm IRQ happened
@ 2017-11-30  2:13 John Hsu
  2017-11-30  2:30 ` Wu-Cheng Li (李務誠)
  2017-11-30 12:33 ` Applied "ASoC: nau8825: set clear_irq when imm IRQ happened" to the asoc tree Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: John Hsu @ 2017-11-30  2:13 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, cychiang, anatol.pomozov, WTLI, wuchengli, John Hsu,
	lgirdwood, YHCHuang, mac.chiang, CTLIN0, mhkuo

Although the crosstalk is disabled, it is better to set clear_irq
properly when the impedance measurement interrupt happens.
It can avoid that the driver clears other IRQs by accident
if the active_irq has another IRQ events.

Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
---
 sound/soc/codecs/nau8825.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c
index d3c1a02..603cd72 100644
--- a/sound/soc/codecs/nau8825.c
+++ b/sound/soc/codecs/nau8825.c
@@ -1733,10 +1733,9 @@ static irqreturn_t nau8825_interrupt(int irq, void *data)
 			nau8825->xtalk_event_mask = event_mask;
 		}
 	} else if (active_irq & NAU8825_IMPEDANCE_MEAS_IRQ) {
-		if (nau8825->xtalk_enable) {
+		if (nau8825->xtalk_enable)
 			schedule_work(&nau8825->xtalk_work);
-			clear_irq = NAU8825_IMPEDANCE_MEAS_IRQ;
-		}
+		clear_irq = NAU8825_IMPEDANCE_MEAS_IRQ;
 	} else if ((active_irq & NAU8825_JACK_INSERTION_IRQ_MASK) ==
 		NAU8825_JACK_INSERTION_DETECTED) {
 		/* One more step to check GPIO status directly. Thus, the
-- 
2.6.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: nau8825: set clear_irq when imm IRQ happened
  2017-11-30  2:13 [PATCH] ASoC: nau8825: set clear_irq when imm IRQ happened John Hsu
@ 2017-11-30  2:30 ` Wu-Cheng Li (李務誠)
  2017-11-30  7:14   ` Wu-Cheng Li (李務誠)
  2017-11-30 12:33 ` Applied "ASoC: nau8825: set clear_irq when imm IRQ happened" to the asoc tree Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Wu-Cheng Li (李務誠) @ 2017-11-30  2:30 UTC (permalink / raw)
  To: John Hsu
  Cc: AP MS30 Linux ALSA, Cheng-yi Chiang, Anatol Pomozov, AC30 WTLi,
	Liam Girdwood, AC30 YHChuang, Mac Chiang, broonie, AC30 CTLin0,
	MS40 MHKuo

Can you combine this patch with "ASoC: nau8825: disable crosstalk by
default"? This should be a part of that patch.

On Thu, Nov 30, 2017 at 10:13 AM, John Hsu <KCHSU0@nuvoton.com> wrote:
> Although the crosstalk is disabled, it is better to set clear_irq
> properly when the impedance measurement interrupt happens.
> It can avoid that the driver clears other IRQs by accident
> if the active_irq has another IRQ events.
>
> Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
> ---
>  sound/soc/codecs/nau8825.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c
> index d3c1a02..603cd72 100644
> --- a/sound/soc/codecs/nau8825.c
> +++ b/sound/soc/codecs/nau8825.c
> @@ -1733,10 +1733,9 @@ static irqreturn_t nau8825_interrupt(int irq, void *data)
>                         nau8825->xtalk_event_mask = event_mask;
>                 }
>         } else if (active_irq & NAU8825_IMPEDANCE_MEAS_IRQ) {
> -               if (nau8825->xtalk_enable) {
> +               if (nau8825->xtalk_enable)
>                         schedule_work(&nau8825->xtalk_work);
> -                       clear_irq = NAU8825_IMPEDANCE_MEAS_IRQ;
> -               }
> +               clear_irq = NAU8825_IMPEDANCE_MEAS_IRQ;
>         } else if ((active_irq & NAU8825_JACK_INSERTION_IRQ_MASK) ==
>                 NAU8825_JACK_INSERTION_DETECTED) {
>                 /* One more step to check GPIO status directly. Thus, the
> --
> 2.6.4
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: nau8825: set clear_irq when imm IRQ happened
  2017-11-30  2:30 ` Wu-Cheng Li (李務誠)
@ 2017-11-30  7:14   ` Wu-Cheng Li (李務誠)
  0 siblings, 0 replies; 4+ messages in thread
From: Wu-Cheng Li (李務誠) @ 2017-11-30  7:14 UTC (permalink / raw)
  To: John Hsu
  Cc: AP MS30 Linux ALSA, Cheng-yi Chiang, Anatol Pomozov, AC30 WTLi,
	Liam Girdwood, AC30 YHChuang, Mac Chiang, broonie, AC30 CTLin0,
	MS40 MHKuo

Never mind. Actually "ASoC: nau8825: disable crosstalk by default" was
already approved.

Reviewed-by: Wu-Cheng Li <wuchengli@chromium.org>
Tested-by: Wu-Cheng Li <wuchengli@chromium.org>
On Thu, Nov 30, 2017 at 10:30 AM, Wu-Cheng Li (李務誠)
<wuchengli@google.com> wrote:
> Can you combine this patch with "ASoC: nau8825: disable crosstalk by
> default"? This should be a part of that patch.
>
> On Thu, Nov 30, 2017 at 10:13 AM, John Hsu <KCHSU0@nuvoton.com> wrote:
>> Although the crosstalk is disabled, it is better to set clear_irq
>> properly when the impedance measurement interrupt happens.
>> It can avoid that the driver clears other IRQs by accident
>> if the active_irq has another IRQ events.
>>
>> Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
>> ---
>>  sound/soc/codecs/nau8825.c | 5 ++---
>>  1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c
>> index d3c1a02..603cd72 100644
>> --- a/sound/soc/codecs/nau8825.c
>> +++ b/sound/soc/codecs/nau8825.c
>> @@ -1733,10 +1733,9 @@ static irqreturn_t nau8825_interrupt(int irq, void *data)
>>                         nau8825->xtalk_event_mask = event_mask;
>>                 }
>>         } else if (active_irq & NAU8825_IMPEDANCE_MEAS_IRQ) {
>> -               if (nau8825->xtalk_enable) {
>> +               if (nau8825->xtalk_enable)
>>                         schedule_work(&nau8825->xtalk_work);
>> -                       clear_irq = NAU8825_IMPEDANCE_MEAS_IRQ;
>> -               }
>> +               clear_irq = NAU8825_IMPEDANCE_MEAS_IRQ;
>>         } else if ((active_irq & NAU8825_JACK_INSERTION_IRQ_MASK) ==
>>                 NAU8825_JACK_INSERTION_DETECTED) {
>>                 /* One more step to check GPIO status directly. Thus, the
>> --
>> 2.6.4
>>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Applied "ASoC: nau8825: set clear_irq when imm IRQ happened" to the asoc tree
  2017-11-30  2:13 [PATCH] ASoC: nau8825: set clear_irq when imm IRQ happened John Hsu
  2017-11-30  2:30 ` Wu-Cheng Li (李務誠)
@ 2017-11-30 12:33 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2017-11-30 12:33 UTC (permalink / raw)
  To: John Hsu
  Cc: alsa-devel, cychiang, anatol.pomozov, WTLI, wuchengli, lgirdwood,
	YHCHuang, mac.chiang, broonie, Wu-Cheng Li, CTLIN0, mhkuo

The patch

   ASoC: nau8825: set clear_irq when imm IRQ happened

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From e3fee43a968fd39dcc56be3757fcdfe250964125 Mon Sep 17 00:00:00 2001
From: John Hsu <KCHSU0@nuvoton.com>
Date: Thu, 30 Nov 2017 10:13:17 +0800
Subject: [PATCH] ASoC: nau8825: set clear_irq when imm IRQ happened

Although the crosstalk is disabled, it is better to set clear_irq
properly when the impedance measurement interrupt happens.
It can avoid that the driver clears other IRQs by accident
if the active_irq has another IRQ events.

Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
Reviewed-by: Wu-Cheng Li <wuchengli@chromium.org>
Tested-by: Wu-Cheng Li <wuchengli@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/nau8825.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c
index d3c1a02f1e15..603cd72c2a25 100644
--- a/sound/soc/codecs/nau8825.c
+++ b/sound/soc/codecs/nau8825.c
@@ -1733,10 +1733,9 @@ static irqreturn_t nau8825_interrupt(int irq, void *data)
 			nau8825->xtalk_event_mask = event_mask;
 		}
 	} else if (active_irq & NAU8825_IMPEDANCE_MEAS_IRQ) {
-		if (nau8825->xtalk_enable) {
+		if (nau8825->xtalk_enable)
 			schedule_work(&nau8825->xtalk_work);
-			clear_irq = NAU8825_IMPEDANCE_MEAS_IRQ;
-		}
+		clear_irq = NAU8825_IMPEDANCE_MEAS_IRQ;
 	} else if ((active_irq & NAU8825_JACK_INSERTION_IRQ_MASK) ==
 		NAU8825_JACK_INSERTION_DETECTED) {
 		/* One more step to check GPIO status directly. Thus, the
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-30 12:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-30  2:13 [PATCH] ASoC: nau8825: set clear_irq when imm IRQ happened John Hsu
2017-11-30  2:30 ` Wu-Cheng Li (李務誠)
2017-11-30  7:14   ` Wu-Cheng Li (李務誠)
2017-11-30 12:33 ` Applied "ASoC: nau8825: set clear_irq when imm IRQ happened" to the asoc tree Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.