Lines Matching refs:usb_dev

178 static int bcma_hcd_usb20_old_arm_init(struct bcma_hcd_device *usb_dev)  in bcma_hcd_usb20_old_arm_init()  argument
180 struct bcma_device *core = usb_dev->core; in bcma_hcd_usb20_old_arm_init()
285 struct bcma_hcd_device *usb_dev = bcma_get_drvdata(dev); in bcma_hci_platform_power_gpio() local
287 if (!usb_dev->gpio_desc) in bcma_hci_platform_power_gpio()
290 gpiod_set_value(usb_dev->gpio_desc, val); in bcma_hci_platform_power_gpio()
343 static int bcma_hcd_usb20_init(struct bcma_hcd_device *usb_dev) in bcma_hcd_usb20_init() argument
345 struct bcma_device *dev = usb_dev->core; in bcma_hcd_usb20_init()
362 usb_dev->ohci_dev = bcma_hcd_create_pdev(dev, "ohci-platform", in bcma_hcd_usb20_init()
365 if (IS_ERR(usb_dev->ohci_dev)) in bcma_hcd_usb20_init()
366 return PTR_ERR(usb_dev->ohci_dev); in bcma_hcd_usb20_init()
368 usb_dev->ehci_dev = bcma_hcd_create_pdev(dev, "ehci-platform", in bcma_hcd_usb20_init()
371 if (IS_ERR(usb_dev->ehci_dev)) { in bcma_hcd_usb20_init()
372 err = PTR_ERR(usb_dev->ehci_dev); in bcma_hcd_usb20_init()
379 platform_device_unregister(usb_dev->ohci_dev); in bcma_hcd_usb20_init()
398 struct bcma_hcd_device *usb_dev; in bcma_hcd_probe() local
402 usb_dev = devm_kzalloc(&core->dev, sizeof(struct bcma_hcd_device), in bcma_hcd_probe()
404 if (!usb_dev) in bcma_hcd_probe()
406 usb_dev->core = core; in bcma_hcd_probe()
408 usb_dev->gpio_desc = devm_gpiod_get_optional(&core->dev, "vcc", in bcma_hcd_probe()
410 if (IS_ERR(usb_dev->gpio_desc)) in bcma_hcd_probe()
411 return dev_err_probe(&core->dev, PTR_ERR(usb_dev->gpio_desc), in bcma_hcd_probe()
417 err = bcma_hcd_usb20_old_arm_init(usb_dev); in bcma_hcd_probe()
419 err = bcma_hcd_usb20_init(usb_dev); in bcma_hcd_probe()
424 err = bcma_hcd_usb20_ns_init(usb_dev); in bcma_hcd_probe()
427 err = bcma_hcd_usb30_init(usb_dev); in bcma_hcd_probe()
435 bcma_set_drvdata(core, usb_dev); in bcma_hcd_probe()
441 struct bcma_hcd_device *usb_dev = bcma_get_drvdata(dev); in bcma_hcd_remove() local
442 struct platform_device *ohci_dev = usb_dev->ohci_dev; in bcma_hcd_remove()
443 struct platform_device *ehci_dev = usb_dev->ehci_dev; in bcma_hcd_remove()