Commit ece2619f authored by Hans de Goede's avatar Hans de Goede Committed by Lee Jones
Browse files

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: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent e5b499f6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,