diff mbox series

[v2,05/12] ASoC: arizona-jack: Fix flags parameter to the gpiod_get("wlf, micd-pol") call

Message ID 20210117160555.78376-6-hdegoede@redhat.com (mailing list archive)
State Superseded
Headers show
Series MFD/extcon/ASoC: Rework arizona codec jack-detect support | expand

Commit Message

Hans de Goede Jan. 17, 2021, 4:05 p.m. UTC
The initial value of the GPIO should match the info->micd_modes[0].gpio
value. arizona_extcon_probe() already stores the necessary flag in a
mode variable, but instead of passing mode as flags to the gpiod_get()
it was using a hardcoded GPIOD_OUT_LOW.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
 sound/soc/codecs/arizona-jack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/sound/soc/codecs/arizona-jack.c b/sound/soc/codecs/arizona-jack.c
index 76aacbac5869..72d23b15108c 100644
--- a/sound/soc/codecs/arizona-jack.c
+++ b/sound/soc/codecs/arizona-jack.c
@@ -1510,7 +1510,7 @@  static int arizona_extcon_probe(struct platform_device *pdev)
 		info->micd_pol_gpio = gpiod_get_optional(arizona->dev,
-							 GPIOD_OUT_LOW);
+							 mode);
 		if (IS_ERR(info->micd_pol_gpio)) {
 			ret = PTR_ERR(info->micd_pol_gpio);