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
@@ -1611,7 +1611,7 @@ isp1301_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
|
||||
dev_dbg(&i2c->dev, "scheduled timer, %d min\n", TIMER_MINUTES);
|
||||
#endif
|
||||
|
||||
status = usb_add_phy(&isp->phy);
|
||||
status = usb_add_phy(&isp->phy, USB_PHY_TYPE_USB2);
|
||||
if (status < 0)
|
||||
dev_err(&i2c->dev, "can't register transceiver, %d\n",
|
||||
status);
|
||||
@@ -1650,7 +1650,7 @@ subsys_initcall(isp_init);
|
||||
static void __exit isp_exit(void)
|
||||
{
|
||||
if (the_transceiver)
|
||||
usb_add_phy(NULL);
|
||||
usb_remove_phy(&the_transceiver->phy);
|
||||
i2c_del_driver(&isp1301_driver);
|
||||
}
|
||||
module_exit(isp_exit);
|
||||
|
Reference in New Issue
Block a user