diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c index 662e91778cb0..93c30a885740 100644 --- a/drivers/extcon/extcon-palmas.c +++ b/drivers/extcon/extcon-palmas.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #define USB_GPIO_DEBOUNCE_MS 20 /* ms */ @@ -208,7 +209,8 @@ static int palmas_usb_probe(struct platform_device *pdev) palmas_usb->wakeup = pdata->wakeup; } - palmas_usb->id_gpiod = devm_gpiod_get_optional(&pdev->dev, "id"); + palmas_usb->id_gpiod = devm_gpiod_get_optional(&pdev->dev, "id", + GPIOD_IN); if (IS_ERR(palmas_usb->id_gpiod)) { dev_err(&pdev->dev, "failed to get id gpio\n"); return PTR_ERR(palmas_usb->id_gpiod);