From: Roger Quadros Date: Mon, 11 Apr 2016 14:04:45 +0000 (+0300) Subject: extcon: usb-gpio: Don't miss event during suspend/resume X-Git-Tag: v4.8-rc1~194^2~5^2~12 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=04c080080855ce84dcd490a2e04805608a21085d;hp=12bd0f323b855ee548367f48062cf58cae5acda8;p=cascardo%2Flinux.git extcon: usb-gpio: Don't miss event during suspend/resume Pin state might have changed during suspend/resume while our interrupts were disabled and if device doesn't support wakeup. Scan for change during resume for such case. Signed-off-by: Roger Quadros Signed-off-by: Chanwoo Choi --- diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c index bc61d1165d73..bad2159d3611 100644 --- a/drivers/extcon/extcon-usb-gpio.c +++ b/drivers/extcon/extcon-usb-gpio.c @@ -185,6 +185,9 @@ static int usb_extcon_resume(struct device *dev) int ret = 0; enable_irq(info->id_irq); + if (!device_may_wakeup(dev)) + queue_delayed_work(system_power_efficient_wq, + &info->wq_detcable, 0); return ret; }