From patchwork Tue Sep 29 06:35:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 54219 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by patches.linaro.org (Postfix) with ESMTPS id 0041F22B1E for ; Tue, 29 Sep 2015 06:36:05 +0000 (UTC) Received: by wicuu12 with SMTP id uu12sf119971wic.2 for ; Mon, 28 Sep 2015 23:36:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-type:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=hWyBdcaLT4MsllLE/q1az8Xc1LLepO2rtL8LRsyRYyc=; b=IGGP9I3XNmuTgrLcq2/emvQCu+QrE4xi82cnFDclvBGBDdnZfovGaryDOf8ycyysVM gKj6HzGO/DxJWk22OfP95VVL3ul8zhQ2U9tN+XQhIy4lad7fh4YC4QZm2UWx/k/zVmOv s3vEXIuWpi+d9IYaDCjkYPY4Uag9M5eUDDdveURGozOsw/u2xnKyeJLWGrIMSTaOTxNP c3vuF/ubSSsR8DdnQ2cR4Am2wpXk5zhEkA2naw2pRo6OOkISLbOlxLg0gq89wt1B8Q5l teoe9R5Zk4xLnWfUeANjwB2hFOvRBLf3mwVtEid7ue0oz3pwlEHqg5Eyze4mDxN9b9oF zxeA== X-Gm-Message-State: ALoCoQno1hF4ANX/Z7LTC5I29RCCH98jgtpCQ5eTmEch0ldBhPrkSSd/LGYR6ioIZP8W2OJDJChR X-Received: by 10.112.147.7 with SMTP id tg7mr3422294lbb.16.1443508563307; Mon, 28 Sep 2015 23:36:03 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.85.81 with SMTP id j78ls397928lfb.81.gmail; Mon, 28 Sep 2015 23:36:03 -0700 (PDT) X-Received: by 10.25.18.103 with SMTP id h100mr4509929lfi.7.1443508563139; Mon, 28 Sep 2015 23:36:03 -0700 (PDT) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id j8si10161210laj.90.2015.09.28.23.36.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Sep 2015 23:36:03 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by labzv5 with SMTP id zv5so40097025lab.1 for ; Mon, 28 Sep 2015 23:36:03 -0700 (PDT) X-Received: by 10.25.210.206 with SMTP id j197mr4449314lfg.86.1443508562985; Mon, 28 Sep 2015 23:36:02 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1949169lbq; Mon, 28 Sep 2015 23:36:02 -0700 (PDT) X-Received: by 10.66.157.137 with SMTP id wm9mr31720276pab.30.1443508561998; Mon, 28 Sep 2015 23:36:01 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pc2si34902361pbb.178.2015.09.28.23.36.01; Mon, 28 Sep 2015 23:36:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755488AbbI2Gf4 (ORCPT + 30 others); 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 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id t8T6ZTZH018582; Tue, 29 Sep 2015 01:35:29 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id t8T6ZT0I003455; Tue, 29 Sep 2015 01:35:29 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Tue, 29 Sep 2015 01:35:29 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id t8T6ZOn2031435; Tue, 29 Sep 2015 01:35:28 -0500 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: kishon@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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);