From patchwork Thu Mar 6 15:31:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 25829 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5D71F203C3 for ; Thu, 6 Mar 2014 15:32:09 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id le5sf6388685vcb.11 for ; Thu, 06 Mar 2014 07:32:09 -0800 (PST) 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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=cqYnaW58rd/MgU8GAweYqDVCj2uAZsxlN7WswYgkhXI=; b=Noir36tqCGWENRTkOHVL/fn6C4wm73O2MDM69qvsa8p4OHqA3BQ508rQE2B1QS3zEQ yUL8hewLaKG0iQRKQVdtzgWaktH2g5scqclFRtN7xR5IHxeU9qoKG1N/G3RZyplzpkwY 4i8ZjIsQo0OM0SJh4aI++/wIKrc7duB/MD/S/s4gY90X+EoBRTODvPzxFX8P0bX+HIDD 5vo7luVlTt+JhNHAAChWvX8jSO8TEaBbiAa7Vy8wDLJSs9An471CiKsS8lKXcVVs9sCk wU+FM26Birh8UGVOZs9W9vtQZVBNgAaIF488kAiq4trrRN9qvQjee19/L4zqjjQMQGED mjrA== X-Gm-Message-State: ALoCoQnrWUQVRHgpY2Ti02vp+f1ToFV3gEC+IxGCOdBWvXpqWp8vWrn3BrAlKFlSGb0VFbexerzh X-Received: by 10.58.58.41 with SMTP id n9mr3214745veq.23.1394119929125; Thu, 06 Mar 2014 07:32:09 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.29.134 with SMTP id b6ls909095qgb.91.gmail; Thu, 06 Mar 2014 07:32:09 -0800 (PST) X-Received: by 10.58.91.101 with SMTP id cd5mr5723353veb.5.1394119928993; Thu, 06 Mar 2014 07:32:08 -0800 (PST) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id sr19si1188417vcb.71.2014.03.06.07.32.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 06 Mar 2014 07:32:08 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id ik5so2706736vcb.23 for ; Thu, 06 Mar 2014 07:32:08 -0800 (PST) X-Received: by 10.58.132.203 with SMTP id ow11mr5854799veb.1.1394119928892; Thu, 06 Mar 2014 07:32:08 -0800 (PST) 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.220.78.9 with SMTP id i9csp46715vck; Thu, 6 Mar 2014 07:32:08 -0800 (PST) X-Received: by 10.68.172.37 with SMTP id az5mr14970410pbc.139.1394119928011; Thu, 06 Mar 2014 07:32:08 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a3si5236365pay.281.2014.03.06.07.32.07; Thu, 06 Mar 2014 07:32:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-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 S1752770AbaCFPcG (ORCPT + 9 others); Thu, 6 Mar 2014 10:32:06 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:48898 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751578AbaCFPcE (ORCPT ); Thu, 6 Mar 2014 10:32:04 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s26FVRJP032654; Thu, 6 Mar 2014 09:31:27 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s26FVRfZ009624; Thu, 6 Mar 2014 09:31:27 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Thu, 6 Mar 2014 09:31:27 -0600 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s26FVNaT007233; Thu, 6 Mar 2014 09:31:24 -0600 From: Roger Quadros To: , , CC: , , , , , , , , , Subject: [PATCH v3 06/13] phy: ti-pipe3: Don't get 'wkupclk' and 'refclk' for SATA PHY Date: Thu, 6 Mar 2014 17:31:22 +0200 Message-ID: <1394119882-12859-1-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1394116729-28811-7-git-send-email-rogerq@ti.com> References: <1394116729-28811-7-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: rogerq@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=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: , SATA PHY doesn't need 'wkupclk; and 'refclk' so don't try to get them for SATA PHY. Signed-off-by: Roger Quadros --- v3 - Fixed checkpatch warning drivers/phy/phy-ti-pipe3.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/phy/phy-ti-pipe3.c b/drivers/phy/phy-ti-pipe3.c index f141237..f925f60 100644 --- a/drivers/phy/phy-ti-pipe3.c +++ b/drivers/phy/phy-ti-pipe3.c @@ -294,16 +294,21 @@ static int ti_pipe3_probe(struct platform_device *pdev) phy->dev = &pdev->dev; - phy->wkupclk = devm_clk_get(phy->dev, "wkupclk"); - if (IS_ERR(phy->wkupclk)) { - dev_err(&pdev->dev, "unable to get wkupclk\n"); - return PTR_ERR(phy->wkupclk); - } + if (!of_device_is_compatible(node, "ti,phy-pipe3-sata")) { + phy->wkupclk = devm_clk_get(phy->dev, "wkupclk"); + if (IS_ERR(phy->wkupclk)) { + dev_err(&pdev->dev, "unable to get wkupclk\n"); + return PTR_ERR(phy->wkupclk); + } - phy->refclk = devm_clk_get(phy->dev, "refclk"); - if (IS_ERR(phy->refclk)) { - dev_err(&pdev->dev, "unable to get refclk\n"); - return PTR_ERR(phy->refclk); + phy->refclk = devm_clk_get(phy->dev, "refclk"); + if (IS_ERR(phy->refclk)) { + dev_err(&pdev->dev, "unable to get refclk\n"); + return PTR_ERR(phy->refclk); + } + } else { + phy->wkupclk = ERR_PTR(-ENODEV); + phy->refclk = ERR_PTR(-ENODEV); } phy->sys_clk = devm_clk_get(phy->dev, "sysclk");