diff options
| author | Chancel Liu <chancel.liu@nxp.com> | 2026-09-13 19:25:00 +0900 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-09-15 17:35:02 +0100 |
| commit | b59a20808727e25bc5c86586955b1901ccc10bd5 (patch) | |
| tree | 05a351daeb943cd5767acf5f71ebe9069566e943 /tools/perf/scripts/python/task-analyzer.py | |
| parent | c7420dd9213de36a25e03c06e6d3367735970f31 (diff) | |
ASoC: simple-card: Free jack GPIOs on card remove
simple_soc_probe() sets up the headphone and microphone jacks, which
takes a reference on the jack detection GPIO and registers an IRQ, a PM
notifier, a delayed work and a sysfs export for it. simple-card has no
card->remove() callback, so none of this is released when the card is
torn down.
This goes unnoticed while the card is only torn down together with its
platform device, because the devres cleanup registered by
snd_soc_jack_add_gpios() is tied to that platform device. It becomes a
problem once the card alone is unregistered and registered again while
the platform device stays bound - for example when a codec component is
unbound and bound again. card->probe() then runs a second time and
gpiod_get_optional() fails with -EBUSY, because the descriptor is still
held by the previous bind. The card is not registered again and audio
stays broken until the platform device itself is unbound.
Add simple_soc_remove() as the counterpart of simple_soc_probe() and
release both jacks from there.
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://patch.msgid.link/20260913102502.2805912-3-chancel.liu@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
