diff options
author | huang lin <hl@rock-chips.com> | 2015-07-17 09:29:25 +0200 |
---|---|---|
committer | Kishon Vijay Abraham I <kishon@ti.com> | 2015-09-25 13:31:14 +0200 |
commit | 08db7e5cbfc0ec3fa4f6ed483dc663afeae7ce16 (patch) | |
tree | a604932d2b6a0a2f5acb2cc283b27da53765fd38 /drivers/phy | |
parent | phy: qcom-ufs: fix build error when the component is built as a module (diff) | |
download | linux-08db7e5cbfc0ec3fa4f6ed483dc663afeae7ce16.tar.xz linux-08db7e5cbfc0ec3fa4f6ed483dc663afeae7ce16.zip |
phy: rockchip-usb: power down phy when rockchip phy probe
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>
Diffstat (limited to 'drivers/phy')
-rw-r--r-- | drivers/phy/phy-rockchip-usb.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/phy/phy-rockchip-usb.c b/drivers/phy/phy-rockchip-usb.c index 5a5c073e72fe..91d6f342c565 100644 --- a/drivers/phy/phy-rockchip-usb.c +++ b/drivers/phy/phy-rockchip-usb.c @@ -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)) { @@ -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); |