summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2017-02-15 14:31:29 +0200
committerChanwoo Choi <cw00.choi@samsung.com>2017-04-06 10:55:22 +0900
commit01944321de3021020886564328684b7603ee216c (patch)
tree4f6706775b0fc180a16b648876805ccb7578197d
parent8680b4d1933fbe3349d51a4e1fd4513b12abffed (diff)
downloadlinux-stable-01944321de3021020886564328684b7603ee216c.tar.gz
linux-stable-01944321de3021020886564328684b7603ee216c.tar.bz2
linux-stable-01944321de3021020886564328684b7603ee216c.zip
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>
-rw-r--r--drivers/extcon/extcon-palmas.c6
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)
if (palmas_usb->enable_gpio_id_detection)
disable_irq_wake(palmas_usb->gpio_id_irq);
}
+
+ /* check if GPIO states changed while suspend/resume */
+ if (palmas_usb->enable_gpio_vbus_detection)
+ palmas_vbus_irq_handler(palmas_usb->gpio_vbus_irq, palmas_usb);
+ palmas_gpio_id_detect(&palmas_usb->wq_detectid.work);
+
return 0;
};
#endif