From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Javier Martin <javier.martin@vista-silicon.com>
Cc: alsa-devel@alsa-project.org, lars@metafoo.de,
w.sang@pengutronix.de, lrg@ti.com
Subject: Re: [PATCH 2/2] sound: soc: tlv320aic32x4: Add rstn gpio to platform data.
Date: Tue, 30 Oct 2012 16:02:53 +0000 [thread overview]
Message-ID: <20121030160252.GV4511@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1351610974-18395-2-git-send-email-javier.martin@vista-silicon.com>
[-- Attachment #1.1: Type: text/plain, Size: 885 bytes --]
On Tue, Oct 30, 2012 at 04:29:34PM +0100, Javier Martin wrote:
> Add the possibility to specify a gpio through platform data
> so that a HW reset can be issued to the codec.
Please use subject lines appropriate for the subsystem you're submitting
against.
> + ret = gpio_request(aic32x4->rstn_gpio, "tlv320aic32x4 rstn");
> + if (ret != 0)
> + return ret;
Should be devm_gpio_request_one(), saving code for cleanup and making
sure there aren't any leaks (I think you have some in error cases here).
gpio_request_one() is better style in general.
> + gpio_direction_output(aic32x4->rstn_gpio, 1);
> + gpio_set_value(aic32x4->rstn_gpio, 0);
> + ndelay(10);
> + gpio_set_value(aic32x4->rstn_gpio, 1);
This looks weird - you request the GPIO active high then immediately
transition it to low. I'd expect the code to set the output low when
putting the GPIO into output mode.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
prev parent reply other threads:[~2012-10-30 16:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-30 15:29 [PATCH 1/2] sound: soc: tlv320aic32x4: Fix problem with first capture Javier Martin
2012-10-30 15:29 ` [PATCH 2/2] sound: soc: tlv320aic32x4: Add rstn gpio to platform data Javier Martin
2012-10-30 16:02 ` Mark Brown [this message]
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=20121030160252.GV4511@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=javier.martin@vista-silicon.com \
--cc=lars@metafoo.de \
--cc=lrg@ti.com \
--cc=w.sang@pengutronix.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