Skip to content

Commit

Permalink
phy: rockchip-usb: power down phy when rockchip phy probe
Browse files Browse the repository at this point in the history
rockchip phy are enable when soc reset, to save power consumption,
we disable it when probe, and enable each phy when it use

Signed-off-by: huang lin <hl@rock-chips.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
  • Loading branch information
huang lin authored and Kishon Vijay Abraham I committed Sep 25, 2015
1 parent 65d49b3 commit 08db7e5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/phy/phy-rockchip-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ static int rockchip_usb_phy_probe(struct platform_device *pdev)
struct device_node *child;
struct regmap *grf;
unsigned int reg_offset;
int err;

grf = syscon_regmap_lookup_by_phandle(dev->of_node, "rockchip,grf");
if (IS_ERR(grf)) {
Expand Down Expand Up @@ -129,6 +130,11 @@ static int rockchip_usb_phy_probe(struct platform_device *pdev)
return PTR_ERR(rk_phy->phy);
}
phy_set_drvdata(rk_phy->phy, rk_phy);

/* only power up usb phy when it use, so disable it when init*/
err = rockchip_usb_phy_power(rk_phy, 1);
if (err)
return err;
}

phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
Expand Down

0 comments on commit 08db7e5

Please sign in to comment.