While looking at reboot issues and module load/unload tests, I found out some resources allocated in the dailink .init() callback are not properly released - there is no existing mechanism in the soc-core to do so.
I experimented with different solutions and the simplest seems to add an .exit() callback. However things are not fully balanced and I could use feedback on the approach.
This patchset includes two examples where this solution is useful, but we have additional ones identified by Ranjani.
Pierre-Louis Bossart (3): ASoC: soc-core: introduce exit() callback for dailinks ASoC: Intel: bdw-rt5677: fix module load/unload issues ASoC: Intel: kbl-rt5660: use .exit() dailink callback to release gpiod
include/sound/soc.h | 3 +++ sound/soc/intel/boards/bdw-rt5677.c | 14 ++++++++++++-- sound/soc/intel/boards/kbl_rt5660.c | 13 +++++++++++-- sound/soc/soc-core.c | 8 +++++++- 4 files changed, 33 insertions(+), 5 deletions(-)