USB: EHCI: Vote for VDD min only when Liquid is undocked
Currently, ehci driver votes for VDD minimization when USB bus goes
to suspend. PHY will not generate interrupt if driver votes for VDD
minimization. Hence set the VDDCX suspend voltage to 0.75V when Liquid
is attached to docking station, so that phy can generate interrupt
as a result of a device plug in.
Change-Id: Iab0bc2855e7729f30ca5665014670e8fa6ca313d
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
diff --git a/drivers/usb/host/ehci-msm2.c b/drivers/usb/host/ehci-msm2.c
index c9a020f..4318efb 100644
--- a/drivers/usb/host/ehci-msm2.c
+++ b/drivers/usb/host/ehci-msm2.c
@@ -175,17 +175,24 @@
}
#ifdef CONFIG_PM_SLEEP
-#define HSUSB_PHY_SUSP_DIG_VOL 500000
+#define HSUSB_PHY_SUSP_DIG_VOL_P50 500000
+#define HSUSB_PHY_SUSP_DIG_VOL_P75 750000
static int msm_ehci_config_vddcx(struct msm_hcd *mhcd, int high)
{
+ struct msm_usb_host_platform_data *pdata;
int max_vol = HSUSB_PHY_VDD_DIG_VOL_MAX;
int min_vol;
int ret;
+ pdata = mhcd->dev->platform_data;
+
if (high)
min_vol = HSUSB_PHY_VDD_DIG_VOL_MIN;
+ else if (pdata && pdata->dock_connect_irq &&
+ !irq_read_line(pdata->dock_connect_irq))
+ min_vol = HSUSB_PHY_SUSP_DIG_VOL_P75;
else
- min_vol = HSUSB_PHY_SUSP_DIG_VOL;
+ min_vol = HSUSB_PHY_SUSP_DIG_VOL_P50;
ret = regulator_set_voltage(mhcd->hsusb_vddcx, min_vol, max_vol);
if (ret) {