]> asedeno.scripts.mit.edu Git - linux.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)
commit6c7103aa026094a4ee2c2708ec6977a6dfc5331d
tree43e8a858f396d43aeacea3d460704bb37086cd9a
parent979b519c7a1bff56a212bf80cc04ae9b4131ea43
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