mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chancel Liu <chancel.liu@oss.nxp.com>
To: Mark Brown <broonie@kernel.org>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] ASoC: audio-graph-card2: Free jack GPIOs on card remove
Date: Sun, 13 Sep 2026 19:25:02 +0900	[thread overview]
Message-ID: <20260913102502.2805912-5-chancel.liu@oss.nxp.com> (raw)
In-Reply-To: <20260913102502.2805912-1-chancel.liu@oss.nxp.com>

From: Chancel Liu <chancel.liu@nxp.com>

audio-graph-card2 uses graph_util_card_probe() to set up the headphone
and microphone jacks, but never released them again, so the jack GPIO,
its IRQ, the PM notifier, the delayed work and the sysfs export stayed
claimed when the card was unbound. Re-binding the card alone - for
instance after a codec component is unbound and bound again - then made
graph_util_card_probe() fail with -EBUSY and the card was never
registered again.

Hook up the graph_util_card_remove() counterpart added for
audio-graph-card.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
 sound/soc/generic/audio-graph-card2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c
index 9fb3d3df5cf6..e11bc8135cb0 100644
--- a/sound/soc/generic/audio-graph-card2.c
+++ b/sound/soc/generic/audio-graph-card2.c
@@ -1310,6 +1310,7 @@ int audio_graph2_parse_of(struct simple_util_priv *priv, struct device *dev,
 		goto end;

 	card->probe	= graph_util_card_probe;
+	card->remove	= graph_util_card_remove;
 	card->owner	= THIS_MODULE;
 	card->dev	= dev;

--
2.50.1


  parent reply	other threads:[~2026-09-13 10:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-13 10:24 [PATCH 0/4] ASoC: generic: " Chancel Liu
2026-09-13 10:24 ` [PATCH 1/4] ASoC: simple-card-utils: Add simple_util_remove_jack() Chancel Liu
2026-09-13 10:25 ` [PATCH 2/4] ASoC: simple-card: Free jack GPIOs on card remove Chancel Liu
2026-09-13 10:25 ` [PATCH 3/4] ASoC: audio-graph-card: " Chancel Liu
2026-09-14  0:29   ` Kuninori Morimoto
2026-09-15  2:46     ` Chancel Liu
2026-09-15  3:16       ` Kuninori Morimoto
2026-09-13 10:25 ` Chancel Liu [this message]
2026-09-15 16:36 ` [PATCH 0/4] ASoC: generic: " Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260913102502.2805912-5-chancel.liu@oss.nxp.com \
    --to=chancel.liu@oss.nxp.com \
    --cc=broonie@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®