diff mbox series

[BACKPORT,4.4.y,13/25] extcon: usb-gpio: Don't miss event during suspend/resume

Message ID 20190322154425.3852517-14-arnd@arndb.de
State New
Headers show
Series candidates from spreadtrum 4.4 product kernel | expand

Commit Message

Arnd Bergmann March 22, 2019, 3:44 p.m. UTC
From: Roger Quadros <rogerq@ti.com>


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 <rogerq@ti.com>

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

(cherry picked from commit 04c080080855ce84dcd490a2e04805608a21085d)
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/extcon/extcon-usb-gpio.c | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.20.0
diff mbox series

Patch

diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c
index 2b2fecffb1ad..c6a7c9ddf0ac 100644
--- a/drivers/extcon/extcon-usb-gpio.c
+++ b/drivers/extcon/extcon-usb-gpio.c
@@ -192,6 +192,9 @@  static int usb_extcon_resume(struct device *dev)
 	}
 
 	enable_irq(info->id_irq);
+	if (!device_may_wakeup(dev))
+		queue_delayed_work(system_power_efficient_wq,
+				   &info->wq_detcable, 0);
 
 	return ret;
 }