Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 662dca54 authored by Kishon Vijay Abraham I's avatar Kishon Vijay Abraham I Committed by Felipe Balbi
Browse files

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: default avatarKishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 721002ec
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2688,7 +2688,7 @@ static int __devinit ab8500_charger_probe(struct platform_device *pdev)
		goto free_ac;
	}

	di->usb_phy = usb_get_phy();
	di->usb_phy = usb_get_phy(USB_PHY_TYPE_USB2);
	if (!di->usb_phy) {
		dev_err(di->dev, "failed to get usb transceiver\n");
		ret = -EINVAL;
+1 −1
Original line number Diff line number Diff line
@@ -415,7 +415,7 @@ static int __devinit isp1704_charger_probe(struct platform_device *pdev)
	if (!isp)
		return -ENOMEM;

	isp->phy = usb_get_phy();
	isp->phy = usb_get_phy(USB_PHY_TYPE_USB2);
	if (!isp->phy)
		goto fail0;

+1 −1
Original line number Diff line number Diff line
@@ -321,7 +321,7 @@ static int pda_power_probe(struct platform_device *pdev)
	}

#ifdef CONFIG_USB_OTG_UTILS
	transceiver = usb_get_phy();
	transceiver = usb_get_phy(USB_PHY_TYPE_USB2);
	if (transceiver && !pdata->is_usb_online) {
		pdata->is_usb_online = otg_is_usb_online;
	}
+1 −1
Original line number Diff line number Diff line
@@ -479,7 +479,7 @@ static int __init twl4030_bci_probe(struct platform_device *pdev)

	INIT_WORK(&bci->work, twl4030_bci_usb_work);

	bci->transceiver = usb_get_phy();
	bci->transceiver = usb_get_phy(USB_PHY_TYPE_USB2);
	if (bci->transceiver != NULL) {
		bci->usb_nb.notifier_call = twl4030_bci_usb_ncb;
		usb_register_notifier(bci->transceiver, &bci->usb_nb);
+1 −1
Original line number Diff line number Diff line
@@ -1687,7 +1687,7 @@ static int udc_start(struct ci13xxx *udc)

	udc->gadget.ep0 = &udc->ep0in->ep;

	udc->transceiver = usb_get_phy();
	udc->transceiver = usb_get_phy(USB_PHY_TYPE_USB2);

	if (udc->udc_driver->flags & CI13XXX_REQUIRE_TRANSCEIVER) {
		if (udc->transceiver == NULL) {
Loading