From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Subject: Re: [RFC PATCH 2/3] ASoC: Intel: bdw-rt5677: fix module load/unload issues
Date: Thu, 5 Mar 2020 12:08:57 -0600 [thread overview]
Message-ID: <7c52ff6f-76ef-7c55-65e6-9c0437bb983a@linux.intel.com> (raw)
In-Reply-To: <20200305174324.GH4046@sirena.org.uk>
On 3/5/20 11:43 AM, Mark Brown wrote:
> 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...
it's been that way since 2016 and the initial contribution. The Chrome
folks might know more, I don't think anyone at Intel has worked on this
code.
>>> 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.
that's precisely what I tried to correct.
>> 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.
Can we split this RFC in two:
a) do you have any objections to adding an .exit() callback? That's what
the main goal was
b) do you have any objections if we remove this devm_ use without trying
to dig further into the gpio management. This is a 2015 product that we
use to verify the SOF driver on Broadwell, not an Intel-owned device.
next prev parent reply other threads:[~2020-03-05 18:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-05 13:06 [RFC PATCH 0/3] ASoC: add dailink .exit() callback Pierre-Louis Bossart
2020-03-05 13:06 ` [RFC PATCH 1/3] ASoC: soc-core: introduce exit() callback for dailinks Pierre-Louis Bossart
2020-03-05 18:15 ` Mark Brown
2020-03-05 13:06 ` [RFC PATCH 2/3] ASoC: Intel: bdw-rt5677: fix module load/unload issues Pierre-Louis Bossart
2020-03-05 13:25 ` Andy Shevchenko
2020-03-05 13:37 ` Pierre-Louis Bossart
2020-03-05 13:36 ` Mark Brown
2020-03-05 13:47 ` Pierre-Louis Bossart
2020-03-05 13:59 ` Mark Brown
2020-03-05 14:51 ` Pierre-Louis Bossart
2020-03-05 17:43 ` Mark Brown
2020-03-05 18:08 ` Pierre-Louis Bossart [this message]
2020-03-05 18:33 ` Mark Brown
2020-03-05 19:10 ` Mark Brown
2020-03-05 21:00 ` Curtis Malainey
2020-03-05 21:48 ` Pierre-Louis Bossart
2020-03-06 13:12 ` Mark Brown
2020-03-05 14:06 ` Amadeusz Sławiński
2020-03-05 14:11 ` Mark Brown
2020-03-05 14:27 ` Andy Shevchenko
2020-03-05 17:58 ` Mark Brown
2020-03-05 13:06 ` [RFC PATCH 3/3] ASoC: Intel: kbl-rt5660: use .exit() dailink callback to release gpiod Pierre-Louis Bossart
2020-03-05 13:27 ` Andy Shevchenko
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=7c52ff6f-76ef-7c55-65e6-9c0437bb983a@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=broonie@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=tiwai@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).