Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Daniel Mack <daniel@zonque.org>
Cc: brian.austin@cirrus.com, subaparts@yandex.ru,
	alsa-devel@alsa-project.org, Paul.Handrigan@cirrus.com
Subject: Re: [PATCH] ASoC: cs4271: free reset gpio in cs4271_remove()
Date: Wed, 19 Feb 2014 20:43:03 +0900	[thread overview]
Message-ID: <20140219114303.GJ2669@sirena.org.uk> (raw)
In-Reply-To: <53049467.60106@zonque.org>


[-- Attachment #1.1: Type: text/plain, Size: 806 bytes --]

On Wed, Feb 19, 2014 at 12:24:23PM +0100, Daniel Mack wrote:
> On 02/19/2014 12:15 PM, Mark Brown wrote:
> > On Wed, Feb 19, 2014 at 12:07:12PM +0100, Daniel Mack wrote:

> >> +	if (gpio_is_valid(cs4271->gpio_nreset)) {
> >>  		/* Set codec to the reset state */
> >>  		gpio_set_value(cs4271->gpio_nreset, 0);
> >> +		devm_gpio_free(codec->dev, cs4271->gpio_nreset);
> >> +	}

> > If it's being requested as a managed resource shouldn't it be being
> > freed automatically?

> Nope, as the module itself will not go away necessarily. I hit the bug
> when unloading and reloading the machine driver. cs4271_probe(codec)
> will fail to acquire and drive the reset line, and the codec stays in reset.

The fix here is to move the resource acquisition to the bus level probe
instead of the ASoC card startup.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2014-02-19 11:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-19 11:07 [PATCH] ASoC: cs4271: free reset gpio in cs4271_remove() Daniel Mack
2014-02-19 11:15 ` Mark Brown
2014-02-19 11:24   ` Daniel Mack
2014-02-19 11:43     ` Mark Brown [this message]
2014-02-19 12:09       ` Daniel Mack
2014-02-19 14:00         ` Mark Brown
2014-02-19 11:43     ` Lars-Peter Clausen

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=20140219114303.GJ2669@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=Paul.Handrigan@cirrus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=brian.austin@cirrus.com \
    --cc=daniel@zonque.org \
    --cc=subaparts@yandex.ru \
    /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