Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1945899AbbGQH37 (ORCPT ); Fri, 17 Jul 2015 03:29:59 -0400 Received: from va-smtp01.263.net ([54.88.144.211]:36531 "EHLO va-smtp01.263.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751901AbbGQH36 (ORCPT ); Fri, 17 Jul 2015 03:29:58 -0400 X-RL-SENDER: hl@rock-chips.com X-FST-TO: dianders@chromium.org X-SENDER-IP: 191.101.57.22 X-LOGIN-NAME: hl@rock-chips.com X-UNIQUE-TAG: <9622a277a5494dc74ed012ac57efc378> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 From: huang lin To: dianders@chromium.org, lyz@rock-chips.com, heiko@sntech.de Cc: huang lin , kishon@ti.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH] phy: rockchip-usb: power down phy when rockchip phy probe Date: Fri, 17 Jul 2015 15:29:25 +0800 Message-Id: <1437118165-20713-1-git-send-email-hl@rock-chips.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1339 Lines: 40 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/