mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 22:52:35 +02:00
usb: host: xhci-plat: get the usb3 phy for shared_hcd
This patch tries to get the USB3 PHY using, and associates the XHCI shared_hcd device with it. With this patch, the USB HUB core driver can do USB PHY operations base on USB PHY framework, e.g. call usb_phy_ notify_connect() or usb_phy_notify_disconnect() to notify USB PHY driver to do soft connect or soft disconnect. Change-Id: I3b51181b840a68ae477b764013446f49dbf7ca70 Signed-off-by: William Wu <wulf@rock-chips.com>
This commit is contained in:
parent
1758c75d33
commit
d4179fa840
|
|
@ -175,6 +175,15 @@ static int xhci_plat_probe(struct platform_device *pdev)
|
|||
if (pdata && pdata->usb3_disable_autosuspend)
|
||||
xhci->quirks |= XHCI_DIS_AUTOSUSPEND;
|
||||
|
||||
xhci->shared_hcd->usb_phy = devm_usb_get_phy(&pdev->dev,
|
||||
USB_PHY_TYPE_USB3);
|
||||
if (IS_ERR(xhci->shared_hcd->usb_phy)) {
|
||||
ret = PTR_ERR(xhci->shared_hcd->usb_phy);
|
||||
if (ret == -EPROBE_DEFER)
|
||||
goto put_usb3_hcd;
|
||||
xhci->shared_hcd->usb_phy = NULL;
|
||||
}
|
||||
|
||||
hcd->usb_phy = devm_usb_get_phy_by_phandle(&pdev->dev, "usb-phy", 0);
|
||||
if (IS_ERR(hcd->usb_phy)) {
|
||||
ret = PTR_ERR(hcd->usb_phy);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user