mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] phy: rockchip-usb: power down phy when rockchip phy probe
@ 2015-07-17  7:29 huang lin
  2015-07-20 18:10 ` Doug Anderson
  0 siblings, 1 reply; 2+ messages in thread
From: huang lin @ 2015-07-17  7:29 UTC (permalink / raw)
  To: dianders, lyz, heiko
  Cc: huang lin, kishon, linux-kernel, linux-arm-kernel, linux-rockchip

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>
---
 drivers/phy/phy-rockchip-usb.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/phy/phy-rockchip-usb.c b/drivers/phy/phy-rockchip-usb.c
index 7d4c336..3b92d7f 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);
-- 
1.9.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-20 18:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-17  7:29 [PATCH] phy: rockchip-usb: power down phy when rockchip phy probe huang lin
2015-07-20 18:10 ` Doug Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®