All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liam Girdwood <liam.r.girdwood@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Takashi Iwai <tiwai@suse.com>
Subject: Re: [PATCH v1] ASoC: Intel: bdw-rt5677: Use devm_gpiod_get()
Date: Tue, 28 Feb 2017 15:19:38 +0000	[thread overview]
Message-ID: <1488295178.2575.24.camel@loki> (raw)
In-Reply-To: <20170220174610.47314-1-andriy.shevchenko@linux.intel.com>

On Mon, 2017-02-20 at 19:46 +0200, Andy Shevchenko wrote:
> Since index is always 0 replace devm_gpiod_get_index() by devm_gpiod_get()
> and apply proper flags.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  sound/soc/intel/boards/bdw-rt5677.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/soc/intel/boards/bdw-rt5677.c b/sound/soc/intel/boards/bdw-rt5677.c
> index ab383af14ca2..8284a40829be 100644
> --- a/sound/soc/intel/boards/bdw-rt5677.c
> +++ b/sound/soc/intel/boards/bdw-rt5677.c
> @@ -205,13 +205,12 @@ static int bdw_rt5677_init(struct snd_soc_pcm_runtime *rtd)
>  			RT5677_CLK_SEL_I2S1_ASRC);
>  
>  	/* Request rt5677 GPIO for headphone amp control */
> -	bdw_rt5677->gpio_hp_en = devm_gpiod_get_index(codec->dev,
> -			"headphone-enable", 0, 0);
> +	bdw_rt5677->gpio_hp_en = devm_gpiod_get(codec->dev, "headphone-enable",
> +						GPIOD_OUT_LOW);
>  	if (IS_ERR(bdw_rt5677->gpio_hp_en)) {
>  		dev_err(codec->dev, "Can't find HP_AMP_SHDN_L gpio\n");
>  		return PTR_ERR(bdw_rt5677->gpio_hp_en);
>  	}
> -	gpiod_direction_output(bdw_rt5677->gpio_hp_en, 0);
>  
>  	/* Create and initialize headphone jack */
>  	if (!snd_soc_card_jack_new(rtd->card, "Headphone Jack",

Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

  reply	other threads:[~2017-02-28 15:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-20 17:46 [PATCH v1] ASoC: Intel: bdw-rt5677: Use devm_gpiod_get() Andy Shevchenko
2017-02-28 15:19 ` Liam Girdwood [this message]
2017-03-07 12:57 ` Applied "ASoC: Intel: bdw-rt5677: Use devm_gpiod_get()" to the asoc tree Mark Brown

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=1488295178.2575.24.camel@loki \
    --to=liam.r.girdwood@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=tiwai@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.