usb: ehci/ohci-platform: assigned hcd phy phandle at platform probe
authorFrank Wang <frank.wang@rock-chips.com>
Thu, 15 Dec 2016 02:50:54 +0000 (10:50 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 19 Dec 2016 08:53:42 +0000 (16:53 +0800)
commite4ec9fa3ca44b58efcddcabe75b2561c131e2852
treef8f6de847d8dcd7918a35da85c88630b396647a9
parent0d71879a760b65ae7ac7e07578ec747e4c9e3e4c
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>
drivers/usb/host/ehci-platform.c
drivers/usb/host/ohci-platform.c