diff options
author | Roger Quadros <rogerq@ti.com> | 2017-02-15 07:31:29 -0500 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2017-04-05 21:55:22 -0400 |
commit | 01944321de3021020886564328684b7603ee216c (patch) | |
tree | 4f6706775b0fc180a16b648876805ccb7578197d /drivers/extcon/extcon-palmas.c | |
parent | 8680b4d1933fbe3349d51a4e1fd4513b12abffed (diff) |
extcon: palmas: Don't miss GPIO events during suspend/resume
The USB cable state can change during suspend/resume
so be sure to check and update the extcon state.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon/extcon-palmas.c')
-rw-r--r-- | drivers/extcon/extcon-palmas.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c index ca904e8b3235..2af4369a2d73 100644 --- a/drivers/extcon/extcon-palmas.c +++ b/drivers/extcon/extcon-palmas.c | |||
@@ -413,6 +413,12 @@ static int palmas_usb_resume(struct device *dev) | |||
413 | if (palmas_usb->enable_gpio_id_detection) | 413 | if (palmas_usb->enable_gpio_id_detection) |
414 | disable_irq_wake(palmas_usb->gpio_id_irq); | 414 | disable_irq_wake(palmas_usb->gpio_id_irq); |
415 | } | 415 | } |
416 | |||
417 | /* check if GPIO states changed while suspend/resume */ | ||
418 | if (palmas_usb->enable_gpio_vbus_detection) | ||
419 | palmas_vbus_irq_handler(palmas_usb->gpio_vbus_irq, palmas_usb); | ||
420 | palmas_gpio_id_detect(&palmas_usb->wq_detectid.work); | ||
421 | |||
416 | return 0; | 422 | return 0; |
417 | }; | 423 | }; |
418 | #endif | 424 | #endif |