diff options
author | Ramneek Mehresh <ramneek.mehresh@freescale.com> | 2013-04-11 11:37:31 (GMT) |
---|---|---|
committer | Xie Xiaobo <xiaobo.xie@nxp.com> | 2017-09-25 07:25:27 (GMT) |
commit | d0d882d9517069e1493ae778ed396a0fa5898b8f (patch) | |
tree | 9443d5878ab718cdebcd2cd41800750b05ab8d9e | |
parent | 42a1431068088a5a9dbeaf94d9a52ba23a5b91eb (diff) | |
download | linux-d0d882d9517069e1493ae778ed396a0fa5898b8f.tar.xz |
usb: host: Remove host drv upon otg bring-up
Change have_hcd variable to remove/suspend host driver on
completion of otg initialization for otg auto detect
Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
-rw-r--r-- | drivers/usb/host/ehci-fsl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 2e6b52a..e670ddb 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -241,6 +241,7 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev) #if defined(CONFIG_FSL_USB2_OTG) || defined(CONFIG_FSL_USB2_OTG_MODULE) if (pdata->operating_mode == FSL_USB2_DR_OTG) { struct ehci_hcd *ehci = hcd_to_ehci(hcd); + struct ehci_fsl *ehci_fsl = hcd_to_ehci_fsl(hcd); hcd->usb_phy = usb_get_phy(USB_PHY_TYPE_USB2); @@ -261,6 +262,11 @@ static int fsl_ehci_drv_probe(struct platform_device *pdev) retval = -ENODEV; goto err2; } + + ehci_fsl->have_hcd = 1; + } else { + dev_err(&pdev->dev, "wrong operating mode\n"); + return -ENODEV; } #endif return retval; |