From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755486AbbI2Gf4 (ORCPT ); Tue, 29 Sep 2015 02:35:56 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:60848 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755333AbbI2Gfb (ORCPT ); Tue, 29 Sep 2015 02:35:31 -0400 From: Kishon Vijay Abraham I To: CC: , Subject: [PATCH 2/3] phy: rockchip-usb: power down phy when rockchip phy probe Date: Tue, 29 Sep 2015 12:05:23 +0530 Message-ID: <1443508524-7546-3-git-send-email-kishon@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1443508524-7546-1-git-send-email-kishon@ti.com> References: <1443508524-7546-1-git-send-email-kishon@ti.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: huang lin 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 Signed-off-by: Kishon Vijay Abraham I --- 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 5a5c073..91d6f34 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.7.9.5