From: Hans de Goede Date: Sun, 7 Mar 2021 15:17:58 +0000 (+0100) Subject: extcon: arizona: Fix flags parameter to the gpiod_get("wlf,micd-pol") call X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ece2619fe8edc703b872136057090627e8a19ab4;p=linux.git extcon: arizona: Fix flags parameter to the gpiod_get("wlf,micd-pol") call 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. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Acked-by: Charles Keepax Acked-by: Chanwoo Choi Signed-off-by: Lee Jones --- diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index 76aacbac5869d..72d23b15108cf 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c @@ -1510,7 +1510,7 @@ static int arizona_extcon_probe(struct platform_device *pdev) */ info->micd_pol_gpio = gpiod_get_optional(arizona->dev, "wlf,micd-pol", - GPIOD_OUT_LOW); + mode); if (IS_ERR(info->micd_pol_gpio)) { ret = PTR_ERR(info->micd_pol_gpio); dev_err(arizona->dev,