Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1727100 > unrolled thread

[PATCH v2 3/3] ASoC: samsung: Fix invalid argument when devm_gpiod_get is called

Started byJaechul Lee <jcsing.lee@samsung.com>
First post2017-09-06 03:10 +0200
Last post2017-09-08 18:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 3/3] ASoC: samsung: Fix invalid argument when  devm_gpiod_get is called Jaechul Lee <jcsing.lee@samsung.com> - 2017-09-06 03:10 +0200
    Re: [PATCH v2 3/3] ASoC: samsung: Fix invalid argument when  devm_gpiod_get is called Krzysztof Kozlowski <krzk@kernel.org> - 2017-09-08 18:50 +0200

#1727100 — [PATCH v2 3/3] ASoC: samsung: Fix invalid argument when devm_gpiod_get is called

FromJaechul Lee <jcsing.lee@samsung.com>
Date2017-09-06 03:10 +0200
Subject[PATCH v2 3/3] ASoC: samsung: Fix invalid argument when devm_gpiod_get is called
Message-ID<umx0S-2j7-11@gated-at.bofh.it>
devm_gpiod_get is called with GPIOF_OUT_INIT_LOW but the function doesn't
allow the parameters. Unluckily, GPIOF_OUT_INIT_LOW is same value as
GPIOD_ASIS and gpio direction isn't set properly.

Muted stream comes up when I try recording some sounds on TM2. mic-bias
gpiod state can't be changed because the gpiod is created with the invalid
parameter. The gpio should be set GPIOD_OUT_HIGH.

Fixes: 1bfbc260a5b4 ("ASoC: samsung: Add machine driver for Exynos5433 based TM2 board")
Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
---
 sound/soc/samsung/tm2_wm5110.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/samsung/tm2_wm5110.c b/sound/soc/samsung/tm2_wm5110.c
index 710e2151141f..a55d18703fe7 100644
--- a/sound/soc/samsung/tm2_wm5110.c
+++ b/sound/soc/samsung/tm2_wm5110.c
@@ -439,8 +439,7 @@ static int tm2_probe(struct platform_device *pdev)
 	snd_soc_card_set_drvdata(card, priv);
 	card->dev = dev;
 
-	priv->gpio_mic_bias = devm_gpiod_get(dev, "mic-bias",
-						GPIOF_OUT_INIT_LOW);
+	priv->gpio_mic_bias = devm_gpiod_get(dev, "mic-bias", GPIOD_OUT_HIGH);
 	if (IS_ERR(priv->gpio_mic_bias)) {
 		dev_err(dev, "Failed to get mic bias gpio\n");
 		return PTR_ERR(priv->gpio_mic_bias);
-- 
2.14.1

[toc] | [next] | [standalone]


#1729078

FromKrzysztof Kozlowski <krzk@kernel.org>
Date2017-09-08 18:50 +0200
Message-ID<unuDD-16Q-1@gated-at.bofh.it>
In reply to#1727100
On Wed, Sep 06, 2017 at 10:04:15AM +0900, Jaechul Lee wrote:
> devm_gpiod_get is called with GPIOF_OUT_INIT_LOW but the function doesn't
> allow the parameters. Unluckily, GPIOF_OUT_INIT_LOW is same value as
> GPIOD_ASIS and gpio direction isn't set properly.
> 
> Muted stream comes up when I try recording some sounds on TM2. mic-bias
> gpiod state can't be changed because the gpiod is created with the invalid
> parameter. The gpio should be set GPIOD_OUT_HIGH.
> 
> Fixes: 1bfbc260a5b4 ("ASoC: samsung: Add machine driver for Exynos5433 based TM2 board")
> Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
> ---
>  sound/soc/samsung/tm2_wm5110.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web