alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Daniel Mack <zonque@gmail.com>
Cc: alsa-devel@alsa-project.org, lrg@ti.com,
	Timur Tabi <timur@freescale.com>
Subject: Re: [PATCH 2/2 v2] ALSA: ASoC: Add reset-gpio DT property to cs4270 driver
Date: Wed, 25 Jul 2012 14:18:16 +0100	[thread overview]
Message-ID: <20120725131816.GN3099@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1343199809-11936-1-git-send-email-zonque@gmail.com>


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

On Wed, Jul 25, 2012 at 09:03:29AM +0200, Daniel Mack wrote:
> In the process of moving over from static board files to the device
> tree, reset pins of peripheral reset pins should be handled by their
> corresponding drivers.
> 
> Add a reset-gpio DT property to the cs4270 driver, and de-assert it
> before probing the chip. The logic could be augmented some day to
> re-assert it when codec is put to suspend.

I'm missing 1/2...  Please also don't bury patches in the middle of
previous threads.

> +		enum of_gpio_flags flags;
> +		int gpio = of_get_named_gpio_flags(np, "reset-gpio", 0, &flags);
> +
> +		if (gpio_is_valid(gpio))
> +			devm_gpio_request_one(&i2c_client->dev, gpio,
> +				     flags & OF_GPIO_ACTIVE_LOW ?
> +					GPIOF_OUT_INIT_LOW : GPIOF_OUT_INIT_HIGH,
> +				     "cs4270 reset");

This ignores the return code and won't work well with probe deferral, if
we manage to get a GPIO from the DT then we should fail if we're unable
request it.  Passing back the return code should get you deferral
support for free in 3.6 and onwards.

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

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



  reply	other threads:[~2012-07-25 13:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-24 20:20 [PATCH 1/2] ALSA: ASoC: add DT bindings for cs4270 Daniel Mack
2012-07-24 20:20 ` [PATCH 2/2] ALSA: ASoC: Add reset-gpio DT property to cs4270 driver Daniel Mack
2012-07-24 20:22 ` [PATCH 1/2] ALSA: ASoC: add DT bindings for cs4270 Timur Tabi
2012-07-24 20:26   ` Daniel Mack
2012-07-24 20:30     ` Timur Tabi
2012-07-24 20:32       ` Daniel Mack
2012-07-24 20:39         ` Timur Tabi
2012-07-24 20:53           ` Daniel Mack
2012-07-24 21:01             ` Timur Tabi
2012-07-25  6:19               ` Daniel Mack
2012-07-24 22:01           ` Stephen Warren
2012-07-24 22:02             ` Timur Tabi
2012-07-24 22:42               ` Mark Brown
2012-07-24 22:41           ` Mark Brown
2012-07-24 22:00       ` Stephen Warren
2012-07-24 22:03         ` Timur Tabi
2012-07-24 22:44           ` Mark Brown
2012-07-25  6:12             ` Daniel Mack
2012-07-25  7:03               ` [PATCH 2/2 v2] ALSA: ASoC: Add reset-gpio DT property to cs4270 driver Daniel Mack
2012-07-25 13:18                 ` Mark Brown [this message]
2012-07-25 13:22                   ` Daniel Mack

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=20120725131816.GN3099@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lrg@ti.com \
    --cc=timur@freescale.com \
    --cc=zonque@gmail.com \
    /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).