diff options
| author | Vijayavardhan Vennapusa <vvreddy@codeaurora.org> | 2018-05-17 17:56:01 +0530 |
|---|---|---|
| committer | Vijayavardhan Vennapusa <vvreddy@codeaurora.org> | 2018-06-04 13:17:02 +0530 |
| commit | 492e7daf22963eb03509937576c114697f1bca71 (patch) | |
| tree | cf92b25bd26fef2029b4e9a7f9b4c434adfaf88f /drivers/usb | |
| parent | fd95dadf54bf08e910a4cad0bbce8d25e8813429 (diff) | |
qmp-phy: Power down PHY durng disconnect to avoid leakage
Currently driver is not powering down QMP PHY if target is booted
up without cable connected. Due to this, 0.3mA leakage current is seen
during standby mode if power measured after bootup. Fix this by
putting QMP PHY in power down state during disconnect.
Change-Id: Idbf7e06ca14649797c50853cf3b9ee182f70749e
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Diffstat (limited to 'drivers/usb')
| -rw-r--r-- | drivers/usb/phy/phy-msm-ssusb-qmp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/phy/phy-msm-ssusb-qmp.c b/drivers/usb/phy/phy-msm-ssusb-qmp.c index a76a6577ee98..3ffb20c4a207 100644 --- a/drivers/usb/phy/phy-msm-ssusb-qmp.c +++ b/drivers/usb/phy/phy-msm-ssusb-qmp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -475,6 +475,9 @@ static int msm_ssphy_qmp_set_suspend(struct usb_phy *uphy, int suspend) if (suspend) { if (phy->cable_connected) msm_ssusb_qmp_enable_autonomous(phy, 1); + else + writel_relaxed(0x00, + phy->base + phy->phy_reg[USB3_PHY_POWER_DOWN_CONTROL]); /* Make sure above write completed with PHY */ wmb(); |
