From: "Ivan T. Ivanov" <iivanov@xxxxxxxxxx>
Signed-off-by: Ivan T. Ivanov <iivanov@xxxxxxxxxx>
---
drivers/usb/phy/phy-msm-usb.c | 30 ++++++++++++++++++++++--------
include/linux/usb/msm_hsusb.h | 3 +++
2 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c[...]
index 298820f..7e5c4ab 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -235,12 +236,16 @@ static void ulpi_init(struct msm_otg *motg)
static int msm_otg_link_clk_reset(struct msm_otg *motg, bool assert)
{
- int ret = 0;
+ int ret;
- if (!motg->pdata->link_clk_reset)
- return ret;
+ if (motg->pdata->link_clk_reset)
+ ret = motg->pdata->link_clk_reset(motg->clk, assert);
+ else
+ if (assert)
+ ret = reset_control_assert(motg->link_rst);[...]
+ else
+ ret = reset_control_deassert(motg->link_rst);