mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
usb: ehci/ohci-platform: assigned hcd phy phandle at platform probe
In ehci/ohci-platform, phy_power_on() gets called twice at probe time, one is at pdata->power_on(); another is in usb_add_hcd(). However, phy_power_off() is only invoked one time when ehci/ohci-platform goes to PM suspend. As a result, the phy power count become inconsistent. This adds assigned phy phandle to hcd-phy at ehci/ohci-platform probe time to prevent hcd invoking generic phy methods again when phy-cells is 0 in DT. Change-Id: I2f0cca622d31a46dea0b805b83b676cc78e4d67c Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
This commit is contained in:
@@ -290,6 +290,8 @@ static int ehci_platform_probe(struct platform_device *dev)
|
||||
}
|
||||
hcd->rsrc_start = res_mem->start;
|
||||
hcd->rsrc_len = resource_size(res_mem);
|
||||
if (priv->num_phys == 1)
|
||||
hcd->phy = priv->phys[0];
|
||||
|
||||
err = usb_add_hcd(hcd, irq, IRQF_SHARED);
|
||||
if (err)
|
||||
|
||||
@@ -250,6 +250,8 @@ static int ohci_platform_probe(struct platform_device *dev)
|
||||
}
|
||||
hcd->rsrc_start = res_mem->start;
|
||||
hcd->rsrc_len = resource_size(res_mem);
|
||||
if (priv->num_phys == 1)
|
||||
hcd->phy = priv->phys[0];
|
||||
|
||||
err = usb_add_hcd(hcd, irq, IRQF_SHARED);
|
||||
if (err)
|
||||
|
||||
Reference in New Issue
Block a user