phy: rockchip-inno-usb2: rm phy_power_on/off in suspend/resume cases.
authorFrank Wang <frank.wang@rock-chips.com>
Fri, 16 Dec 2016 01:09:23 +0000 (09:09 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 21 Dec 2016 03:06:31 +0000 (11:06 +0800)
Usb-controller can invoke phy_power_on/off in its suspend/resume
process, so usb-phy need not do it again.

This adds remove phy_power_on/off in its suspend/resume cases.

Change-Id: Ice30e79ffba8116ca9bfae344c7ea232f6580130
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
drivers/phy/phy-rockchip-inno-usb2.c

index b5321bac9e1286264c09386ae40a81c068c0c8b3..5f8597ab0fa13a71a09d8a810bd1c5f33f506a18 100644 (file)
@@ -1356,13 +1356,6 @@ static int rockchip_usb2phy_pm_suspend(struct device *dev)
                if (!rport->phy)
                        continue;
 
-               if (!rport->suspended) {
-                       if (rport->port_id == USB2PHY_PORT_HOST)
-                               rockchip_usb2phy_sm_work(&rport->sm_work.work);
-                       else
-                               rockchip_usb2phy_power_off(rport->phy);
-               }
-
                /* activate the linestate to detect the next interrupt. */
                property_enable(rphy, &rport->port_cfg->ls_det_clr, true);
                property_enable(rphy, &rport->port_cfg->ls_det_en, true);
@@ -1373,24 +1366,6 @@ static int rockchip_usb2phy_pm_suspend(struct device *dev)
 
 static int rockchip_usb2phy_pm_resume(struct device *dev)
 {
-       struct rockchip_usb2phy *rphy = dev_get_drvdata(dev);
-       struct rockchip_usb2phy_port *rport;
-       int index;
-
-       for (index = 0; index < rphy->phy_cfg->num_ports; index++) {
-               rport = &rphy->ports[index];
-               if (!rport->phy)
-                       continue;
-
-               /*
-                * Resuming case, for host-port, *_linestate_irq() will take
-                * over all actions, but for otg-port, we should invoke
-                * *_power_on() to resume the phy-port manually.
-                */
-               if (rport->suspended && rport->port_id == USB2PHY_PORT_OTG)
-                       rockchip_usb2phy_power_on(rport->phy);
-       }
-
        return 0;
 }