diff options
| author | Manu Gautam <mgautam@codeaurora.org> | 2016-12-15 11:39:46 +0530 |
|---|---|---|
| committer | Vijayavardhan Vennapusa <vvreddy@codeaurora.org> | 2016-12-19 19:39:11 +0530 |
| commit | 317f5e44fbbb9f6245d71f4583a8ae3154813d9c (patch) | |
| tree | 63eaea146554634169f3dc11cfd392a8a8b4ceb2 | |
| parent | 2d28ff09533427b3fc0b9651eff8c1d936f2cfb4 (diff) | |
usb: phy: qusb: Keep LDOs ON during disconnect if PMI voted for it
PMI software requests PHY driver to turn-ON LDOs before running
charger detection. This is needed to have USB data lines in hi-Z
state. If there is race between USB driver processing disconnect
and next rm_pulldown request, then there is a possibility of
PHY driver turning-off LDOs even if PMI voted for it. This can
cause charger detection to fail. To fix this add a check in PHY
driver to check PMI vote in disconnect handling.
Change-Id: I6e873207aeee60e8e933430fc4e755aef81ab447
CRs-fixed: 1097343
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
| -rw-r--r-- | drivers/usb/phy/phy-msm-qusb.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/phy/phy-msm-qusb.c b/drivers/usb/phy/phy-msm-qusb.c index 839d701ec9b5..c81452ded5b1 100644 --- a/drivers/usb/phy/phy-msm-qusb.c +++ b/drivers/usb/phy/phy-msm-qusb.c @@ -701,7 +701,12 @@ static int qusb_phy_set_suspend(struct usb_phy *phy, int suspend) if (qphy->tcsr_clamp_dig_n) writel_relaxed(0x0, qphy->tcsr_clamp_dig_n); - qusb_phy_enable_power(qphy, false); + /* Do not disable power rails if there is vote for it */ + if (!qphy->rm_pulldown) + qusb_phy_enable_power(qphy, false); + else + dev_dbg(phy->dev, "race with rm_pulldown. Keep ldo ON\n"); + /* * Set put_into_high_z_state to true so next USB * cable connect, DPF_DMF request performs PHY |
