[RFC PATCH 2/3] ASoC: Intel: bdw-rt5677: fix module load/unload issues

Mark Brown broonie at kernel.org
Thu Mar 5 18:43:24 CET 2020


On Thu, Mar 05, 2020 at 08:51:03AM -0600, Pierre-Louis Bossart wrote:

> > This doesn't answer the question: why is the machine driver not
> > requesting the GPIO on device model probe?

> I *think* it's due to the need to use the codec component->dev, which is
> only available with the dailink callbacks - not on platform device probe
> which ends with the card registration.

Why do you have this need?  This is sounding a lot like the CODEC ought
to be requesting it...

> > So you've removed the driver which will have unbound the device but devm
> > actions don't seem to have fired?  That seems worrying...

> Well, the devm uses the component device, not the card device, so when
> removing the machine driver nothing should happen. The problem seems to be
> in the removal of the codec and component drivers.

Right, it's always a bad idea to do allocations with devm_ on a device
other than the one that you're currently working with - that clearly
leads to lifetime issues.

> We tried to use the card device instead but then the gpiod_get fails.

I think you need to take a step back and work out what you're actually
doing here.  It doesn't sound like the problem has been fully understood
so there's no clear articulation of what you're trying to do.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20200305/4f1d4a99/attachment.sig>


More information about the Alsa-devel mailing list