aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-27 11:25:20 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-27 11:25:20 -0500
commit842f57baab186417d89810f3dd6147f1ef3009dd (patch)
tree63150a49c6ce3ba28d5a98abbab780b4fe8022dc /drivers/usb/dwc3
parentfc625960edecfb57e62c2975d1f155155e28e6ba (diff)
parenteee47538ec1f26198cf5da675975b61d7f16135b (diff)
Merge tag 'for-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-testing
Kishon writes: Improvements in phy-core specifically on PHY core finds the PHY in the case of non-dt boot. Adds three new PHY drivers using the PHY framework and some miscellaneous fixes and cleanups.
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r--drivers/usb/dwc3/host.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
index dcb8ca084598..12bfd3c5405e 100644
--- a/drivers/usb/dwc3/host.c
+++ b/drivers/usb/dwc3/host.c
@@ -29,8 +29,7 @@ int dwc3_host_init(struct dwc3 *dwc)
29 xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO); 29 xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO);
30 if (!xhci) { 30 if (!xhci) {
31 dev_err(dwc->dev, "couldn't allocate xHCI device\n"); 31 dev_err(dwc->dev, "couldn't allocate xHCI device\n");
32 ret = -ENOMEM; 32 return -ENOMEM;
33 goto err0;
34 } 33 }
35 34
36 dma_set_coherent_mask(&xhci->dev, dwc->dev->coherent_dma_mask); 35 dma_set_coherent_mask(&xhci->dev, dwc->dev->coherent_dma_mask);
@@ -60,22 +59,33 @@ int dwc3_host_init(struct dwc3 *dwc)
60 goto err1; 59 goto err1;
61 } 60 }
62 61
62 phy_create_lookup(dwc->usb2_generic_phy, "usb2-phy",
63 dev_name(&xhci->dev));
64 phy_create_lookup(dwc->usb3_generic_phy, "usb3-phy",
65 dev_name(&xhci->dev));
66
63 ret = platform_device_add(xhci); 67 ret = platform_device_add(xhci);
64 if (ret) { 68 if (ret) {
65 dev_err(dwc->dev, "failed to register xHCI device\n"); 69 dev_err(dwc->dev, "failed to register xHCI device\n");
66 goto err1; 70 goto err2;
67 } 71 }
68 72
69 return 0; 73 return 0;
70 74err2:
75 phy_remove_lookup(dwc->usb2_generic_phy, "usb2-phy",
76 dev_name(&xhci->dev));
77 phy_remove_lookup(dwc->usb3_generic_phy, "usb3-phy",
78 dev_name(&xhci->dev));
71err1: 79err1:
72 platform_device_put(xhci); 80 platform_device_put(xhci);
73
74err0:
75 return ret; 81 return ret;
76} 82}
77 83
78void dwc3_host_exit(struct dwc3 *dwc) 84void dwc3_host_exit(struct dwc3 *dwc)
79{ 85{
86 phy_remove_lookup(dwc->usb2_generic_phy, "usb2-phy",
87 dev_name(&dwc->xhci->dev));
88 phy_remove_lookup(dwc->usb3_generic_phy, "usb3-phy",
89 dev_name(&dwc->xhci->dev));
80 platform_device_unregister(dwc->xhci); 90 platform_device_unregister(dwc->xhci);
81} 91}