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 <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
Hans de Goede 2021-03-07 16:17:58 +01:00 committed by Lee Jones
parent e5b499f6fb
commit ece2619fe8
1 changed files with 1 additions and 1 deletions

View File

@ -1510,7 +1510,7 @@ static int arizona_extcon_probe(struct platform_device *pdev)
*/ */
info->micd_pol_gpio = gpiod_get_optional(arizona->dev, info->micd_pol_gpio = gpiod_get_optional(arizona->dev,
"wlf,micd-pol", "wlf,micd-pol",
GPIOD_OUT_LOW); mode);
if (IS_ERR(info->micd_pol_gpio)) { if (IS_ERR(info->micd_pol_gpio)) {
ret = PTR_ERR(info->micd_pol_gpio); ret = PTR_ERR(info->micd_pol_gpio);
dev_err(arizona->dev, dev_err(arizona->dev,