[PATCH 5/8][RESEND]usb:fsl:otg: Remove host drv upon otg bring-up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
Reviewed-by: Li Yang-R58472 <LeoLi@xxxxxxxxxxxxx>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@xxxxxxxxxxxxx>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@xxxxxxxxxxxxx>
---
 drivers/usb/host/ehci-fsl.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 8f329a0..95c2feb 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -177,6 +177,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver,
 #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);
 
@@ -197,6 +198,11 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver,
 			retval = -ENODEV;
 			goto err2;
 		}
+
+		ehci_fsl->have_hcd = 1;
+	} else {
+		dev_err(&pdev->dev, "wrong operating mode\n");
+		return -ENODEV;
 	}
 #endif
 	return retval;
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux