diff options
Diffstat (limited to 'drivers/extcon/extcon-usb-gpio.c')
-rw-r--r-- | drivers/extcon/extcon-usb-gpio.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c index d589c5feff3d..a5e1882b4ca6 100644 --- a/drivers/extcon/extcon-usb-gpio.c +++ b/drivers/extcon/extcon-usb-gpio.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
28 | #include <linux/workqueue.h> | 28 | #include <linux/workqueue.h> |
29 | #include <linux/acpi.h> | 29 | #include <linux/acpi.h> |
30 | #include <linux/pinctrl/consumer.h> | ||
30 | 31 | ||
31 | #define USB_GPIO_DEBOUNCE_MS 20 /* ms */ | 32 | #define USB_GPIO_DEBOUNCE_MS 20 /* ms */ |
32 | 33 | ||
@@ -245,6 +246,9 @@ static int usb_extcon_suspend(struct device *dev) | |||
245 | if (info->vbus_gpiod) | 246 | if (info->vbus_gpiod) |
246 | disable_irq(info->vbus_irq); | 247 | disable_irq(info->vbus_irq); |
247 | 248 | ||
249 | if (!device_may_wakeup(dev)) | ||
250 | pinctrl_pm_select_sleep_state(dev); | ||
251 | |||
248 | return ret; | 252 | return ret; |
249 | } | 253 | } |
250 | 254 | ||
@@ -253,6 +257,9 @@ static int usb_extcon_resume(struct device *dev) | |||
253 | struct usb_extcon_info *info = dev_get_drvdata(dev); | 257 | struct usb_extcon_info *info = dev_get_drvdata(dev); |
254 | int ret = 0; | 258 | int ret = 0; |
255 | 259 | ||
260 | if (!device_may_wakeup(dev)) | ||
261 | pinctrl_pm_select_default_state(dev); | ||
262 | |||
256 | if (device_may_wakeup(dev)) { | 263 | if (device_may_wakeup(dev)) { |
257 | if (info->id_gpiod) { | 264 | if (info->id_gpiod) { |
258 | ret = disable_irq_wake(info->id_irq); | 265 | ret = disable_irq_wake(info->id_irq); |