Lines Matching refs:hsotg

122 	struct dwc2_hsotg *hsotg = platform_get_drvdata(dev);  in dwc2_driver_remove()  local
124 if (hsotg->hcd_enabled) in dwc2_driver_remove()
125 dwc2_hcd_remove(hsotg); in dwc2_driver_remove()
126 if (hsotg->gadget_enabled) in dwc2_driver_remove()
127 s3c_hsotg_remove(hsotg); in dwc2_driver_remove()
158 struct dwc2_hsotg *hsotg; in dwc2_driver_probe() local
180 hsotg = devm_kzalloc(&dev->dev, sizeof(*hsotg), GFP_KERNEL); in dwc2_driver_probe()
181 if (!hsotg) in dwc2_driver_probe()
184 hsotg->dev = &dev->dev; in dwc2_driver_probe()
201 dev_dbg(hsotg->dev, "registering common handler for irq%d\n", in dwc2_driver_probe()
203 retval = devm_request_irq(hsotg->dev, irq, in dwc2_driver_probe()
205 dev_name(hsotg->dev), hsotg); in dwc2_driver_probe()
210 hsotg->regs = devm_ioremap_resource(&dev->dev, res); in dwc2_driver_probe()
211 if (IS_ERR(hsotg->regs)) in dwc2_driver_probe()
212 return PTR_ERR(hsotg->regs); in dwc2_driver_probe()
215 (unsigned long)res->start, hsotg->regs); in dwc2_driver_probe()
217 hsotg->dr_mode = of_usb_get_dr_mode(dev->dev.of_node); in dwc2_driver_probe()
225 hsotg->phy = NULL; in dwc2_driver_probe()
228 hsotg->uphy = NULL; in dwc2_driver_probe()
230 hsotg->uphy = uphy; in dwc2_driver_probe()
232 hsotg->phy = phy; in dwc2_driver_probe()
233 phy_power_on(hsotg->phy); in dwc2_driver_probe()
234 phy_init(hsotg->phy); in dwc2_driver_probe()
237 spin_lock_init(&hsotg->lock); in dwc2_driver_probe()
238 mutex_init(&hsotg->init_mutex); in dwc2_driver_probe()
240 if (hsotg->dr_mode != USB_DR_MODE_HOST) { in dwc2_driver_probe()
241 retval = dwc2_gadget_init(hsotg, irq); in dwc2_driver_probe()
244 hsotg->gadget_enabled = 1; in dwc2_driver_probe()
247 if (hsotg->dr_mode != USB_DR_MODE_PERIPHERAL) { in dwc2_driver_probe()
248 retval = dwc2_hcd_init(hsotg, irq, params); in dwc2_driver_probe()
250 if (hsotg->gadget_enabled) in dwc2_driver_probe()
251 s3c_hsotg_remove(hsotg); in dwc2_driver_probe()
254 hsotg->hcd_enabled = 1; in dwc2_driver_probe()
257 platform_set_drvdata(dev, hsotg); in dwc2_driver_probe()