OTG: usb_multi_charger_detect
Ported from JCsullins 3.0 Kernel
Change-Id: I3908fd6e4fa6c526c1c9bf9d178491d78a3c6022
diff --git a/drivers/usb/otg/msm72k_otg.c b/drivers/usb/otg/msm72k_otg.c
index c95905e..9a10ff6 100644
--- a/drivers/usb/otg/msm72k_otg.c
+++ b/drivers/usb/otg/msm72k_otg.c
@@ -1424,6 +1424,22 @@
 	return -1;
 }
 
+#ifdef CONFIG_USB_MULTIPLE_CHARGER_DETECT
+static int usb_ulpi_write_with_reset(struct usb_phy *xceiv, u32 val, u32 reg)
+{
+	struct msm_otg *dev = container_of(xceiv, struct msm_otg, phy);
+
+	return ulpi_write_with_reset(dev, val, reg);
+}
+
+static int usb_ulpi_read_with_reset(struct usb_phy *xceiv, u32 reg)
+{
+	struct msm_otg *dev = container_of(xceiv, struct msm_otg, phy);
+
+	return ulpi_read_with_reset(dev, reg);
+}
+#endif
+
 /* some of the older targets does not turn off the PLL
  * if onclock bit is set and clocksuspendM bit is on,
  * hence clear them too and initiate the suspend mode
@@ -2598,6 +2614,10 @@
 struct usb_phy_io_ops msm_otg_io_ops = {
 	.read = usb_ulpi_read,
 	.write = usb_ulpi_write,
+#ifdef CONFIG_USB_MULTIPLE_CHARGER_DETECT
+	.read_with_reset = usb_ulpi_read_with_reset,
+	.write_with_reset = usb_ulpi_write_with_reset,
+#endif
 };
 
 static int __init msm_otg_probe(struct platform_device *pdev)