* [PATCH v1] ASoC: Intel: bdw-rt5677: Use devm_gpiod_get()
@ 2017-02-20 17:46 Andy Shevchenko
2017-02-28 15:19 ` Liam Girdwood
2017-03-07 12:57 ` Applied "ASoC: Intel: bdw-rt5677: Use devm_gpiod_get()" to the asoc tree Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2017-02-20 17:46 UTC (permalink / raw)
To: Mark Brown, alsa-devel, Liam Girdwood, Takashi Iwai; +Cc: Andy Shevchenko
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",
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] ASoC: Intel: bdw-rt5677: Use devm_gpiod_get()
2017-02-20 17:46 [PATCH v1] ASoC: Intel: bdw-rt5677: Use devm_gpiod_get() Andy Shevchenko
@ 2017-02-28 15:19 ` Liam Girdwood
2017-03-07 12:57 ` Applied "ASoC: Intel: bdw-rt5677: Use devm_gpiod_get()" to the asoc tree Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2017-02-28 15:19 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: alsa-devel, Mark Brown, Liam Girdwood, Takashi Iwai
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Applied "ASoC: Intel: bdw-rt5677: Use devm_gpiod_get()" to the asoc tree
2017-02-20 17:46 [PATCH v1] ASoC: Intel: bdw-rt5677: Use devm_gpiod_get() Andy Shevchenko
2017-02-28 15:19 ` Liam Girdwood
@ 2017-03-07 12:57 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2017-03-07 12:57 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Liam Girdwood, alsa-devel, Mark Brown, Liam Girdwood,
Takashi Iwai
The patch
ASoC: Intel: bdw-rt5677: Use devm_gpiod_get()
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From b3ec72ace939b0abd75d5d875e77cf0b777debb7 Mon Sep 17 00:00:00 2001
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Mon, 20 Feb 2017 19:46:10 +0200
Subject: [PATCH] ASoC: Intel: bdw-rt5677: Use devm_gpiod_get()
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>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
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 53c6b4cbb1e1..14d9693c1641 100644
--- a/sound/soc/intel/boards/bdw-rt5677.c
+++ b/sound/soc/intel/boards/bdw-rt5677.c
@@ -193,13 +193,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",
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-07 12:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-20 17:46 [PATCH v1] ASoC: Intel: bdw-rt5677: Use devm_gpiod_get() Andy Shevchenko
2017-02-28 15:19 ` Liam Girdwood
2017-03-07 12:57 ` Applied "ASoC: Intel: bdw-rt5677: Use devm_gpiod_get()" to the asoc tree Mark Brown
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).