From patchwork Fri Jul 17 07:29:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: huang lin X-Patchwork-Id: 6813601 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 709ABC05AC for ; Fri, 17 Jul 2015 07:34:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 955D82066C for ; Fri, 17 Jul 2015 07:34:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B53D720663 for ; Fri, 17 Jul 2015 07:34:52 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZG06D-0007gV-Fl; Fri, 17 Jul 2015 07:30:25 +0000 Received: from va-smtp01.263.net ([54.88.144.211]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZG066-0005Cu-W8; Fri, 17 Jul 2015 07:30:20 +0000 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by va-smtp01.263.net (Postfix) with ESMTP id CE2489F766; Fri, 17 Jul 2015 15:29:44 +0800 (CST) 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-SENDER: hl@rock-chips.com X-DNS-TYPE: 0 Received: from localhost.localdomain (unknown [191.101.57.22]) by va-smtp01.263.net (Postfix) whith ESMTP id 32528NAVJIY; Fri, 17 Jul 2015 15:29:48 +0800 (CST) From: huang lin To: dianders@chromium.org, lyz@rock-chips.com, heiko@sntech.de 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150717_003019_130882_9FDAB605 X-CRM114-Status: UNSURE ( 5.59 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, huang lin , linux-arm-kernel@lists.infradead.org, kishon@ti.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Douglas Anderson --- 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);