]> git.baikalelectronics.ru Git - kernel.git/commit
phy: phy-twl4030-usb: fix denied runtime access
authorAndreas Kemnade <andreas@kemnade.info>
Sat, 22 Sep 2018 09:44:05 +0000 (11:44 +0200)
committerKishon Vijay Abraham I <kishon@ti.com>
Tue, 25 Sep 2018 10:40:12 +0000 (16:10 +0530)
commit91b85d83bf037c443802c6676a382e690708e278
tree43e8a858f396d43aeacea3d460704bb37086cd9a
parentccd2a057eafd800734fb47702a462df46e7de553
phy: phy-twl4030-usb: fix denied runtime access

When runtime is not enabled, pm_runtime_get_sync() returns -EACCESS,
the counter will be incremented but the resume callback not called,
so enumeration and charging will not start properly.
To avoid that happen, disable irq on suspend and recheck on resume.

Practically this happens when the device is woken up from suspend by
plugging in usb.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/ti/phy-twl4030-usb.c