]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 26 Nov 2019 12:16:48 +0000 (13:16 +0100)
commitb6198353f1a289ac087f9e91d4a2bce9217edd51
tree531e065e993575db5e3293329e4a671b1f531112
parentdac8f7b356250a80d374f9558b288bae5336bb1d
phy: phy-twl4030-usb: fix denied runtime access

BugLink: https://bugs.launchpad.net/bugs/1853915
[ Upstream commit 6c7103aa026094a4ee2c2708ec6977a6dfc5331d ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/phy/ti/phy-twl4030-usb.c