usb: otg: support for multiple transceivers by a single controller
Add a linked list for keeping multiple PHY instances with different types so that we can have separate USB2 and USB3 PHYs on one single board. _get_phy_ has been changed so that the controller gets the transceiver by type. _remove_phy_ has been added to let the phy be removed from the phy list. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:

committed by
Felipe Balbi

parent
721002ec1d
commit
662dca54ca
@@ -320,7 +320,7 @@ static int __init gpio_vbus_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
/* only active when a gadget is registered */
|
||||
err = usb_add_phy(&gpio_vbus->phy);
|
||||
err = usb_add_phy(&gpio_vbus->phy, USB_PHY_TYPE_USB2);
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "can't register transceiver, err: %d\n",
|
||||
err);
|
||||
@@ -354,7 +354,7 @@ static int __exit gpio_vbus_remove(struct platform_device *pdev)
|
||||
cancel_delayed_work_sync(&gpio_vbus->work);
|
||||
regulator_put(gpio_vbus->vbus_draw);
|
||||
|
||||
usb_add_phy(NULL);
|
||||
usb_remove_phy(&gpio_vbus->phy);
|
||||
|
||||
free_irq(gpio_vbus->irq, pdev);
|
||||
if (gpio_is_valid(pdata->gpio_pullup))
|
||||
|
Reference in New Issue
Block a user