summaryrefslogtreecommitdiff
path: root/drivers/extcon
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-03-07 18:17:58 +0300
committerLee Jones <lee.jones@linaro.org>2021-03-18 14:46:15 +0300
commitece2619fe8edc703b872136057090627e8a19ab4 (patch)
tree1e86315069030ebb4ddc09db961cb5cdd5ad70c0 /drivers/extcon
parente5b499f6fb17bc95a813e85d0796522280203806 (diff)
downloadlinux-ece2619fe8edc703b872136057090627e8a19ab4.tar.xz
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>
Diffstat (limited to 'drivers/extcon')
-rw-r--r--drivers/extcon/extcon-arizona.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index 76aacbac5869..72d23b15108c 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,