linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] ASoC: rt5640: Silence warning message about missing interrupt
@ 2021-08-02 18:52 Dmitry Osipenko
  2021-08-06  0:47 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Osipenko @ 2021-08-02 18:52 UTC (permalink / raw)
  To: Oder Chiou, Mark Brown, Takashi Iwai, Jaroslav Kysela, Liam Girdwood
  Cc: alsa-devel, linux-kernel

Interrupt is optional for the RT5640 codec. Nexus 7 doesn't use interrupt,
this results in a noisy warning message that looks like a error condition.
Make interrupt explicitly optional to silence the message, use modern
IRQF_NO_AUTOEN flag and correct the reg[q]uest typo in the message.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 sound/soc/codecs/rt5640.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index 9523f4b5c800..0f5087a7644b 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -2836,15 +2836,18 @@ static int rt5640_i2c_probe(struct i2c_client *i2c,
 	if (ret)
 		return ret;
 
-	ret = devm_request_irq(&i2c->dev, rt5640->irq, rt5640_irq,
-			       IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING
-			       | IRQF_ONESHOT, "rt5640", rt5640);
-	if (ret == 0) {
-		/* Gets re-enabled by rt5640_set_jack() */
-		disable_irq(rt5640->irq);
+	if (rt5640->irq) {
+		/* enabled by rt5640_set_jack() */
+		ret = devm_request_irq(&i2c->dev, rt5640->irq, rt5640_irq,
+				       IRQF_TRIGGER_RISING | IRQF_NO_AUTOEN |
+				       IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
+				       "rt5640", rt5640);
+		if (ret) {
+			dev_err(&i2c->dev, "Failed to request IRQ %d: %d\n",
+				rt5640->irq, ret);
+			return ret;
+		}
 	} else {
-		dev_warn(&i2c->dev, "Failed to reguest IRQ %d: %d\n",
-			 rt5640->irq, ret);
 		rt5640->irq = -ENXIO;
 	}
 
-- 
2.32.0


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

* Re: [PATCH v1] ASoC: rt5640: Silence warning message about missing interrupt
  2021-08-02 18:52 [PATCH v1] ASoC: rt5640: Silence warning message about missing interrupt Dmitry Osipenko
@ 2021-08-06  0:47 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-08-06  0:47 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Dmitry Osipenko, Oder Chiou,
	Liam Girdwood
  Cc: Mark Brown, linux-kernel, alsa-devel

On Mon, 2 Aug 2021 21:52:58 +0300, Dmitry Osipenko wrote:
> Interrupt is optional for the RT5640 codec. Nexus 7 doesn't use interrupt,
> this results in a noisy warning message that looks like a error condition.
> Make interrupt explicitly optional to silence the message, use modern
> IRQF_NO_AUTOEN flag and correct the reg[q]uest typo in the message.
> 
> 
> 
> [...]

Applied to

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

Thanks!

[1/1] ASoC: rt5640: Silence warning message about missing interrupt
      commit: 585fb31c2c3aad38a5add009171d7e3277b76d45

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

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

end of thread, other threads:[~2021-08-06  0:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02 18:52 [PATCH v1] ASoC: rt5640: Silence warning message about missing interrupt Dmitry Osipenko
2021-08-06  0:47 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).