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.
Attachment:
signature.asc
Description: PGP signature