From patchwork Thu Nov 28 10:46:36 2019 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: 180390 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7346474ilf; Thu, 28 Nov 2019 02:47:51 -0800 (PST) X-Google-Smtp-Source: APXvYqyjK8CPYlodqeXzTkImdBfSGWxkLKkQh7zC59Ha6ZR8JH4SyuVO9J922UUW6FoXUKmJ4VWq X-Received: by 2002:aa7:c65a:: with SMTP id z26mr37679329edr.261.1574938070949; Thu, 28 Nov 2019 02:47:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574938070; cv=none; d=google.com; s=arc-20160816; b=K4/yRBKjyoxO4k2d5lX5qqBm/R1nTauCln7QaW7OPiU02bb0LRyy34QCi/bDURHz03 +TOxYtteiYjMdXnNCTm8dcq1GUA9dQiJ7Fj0zBLfb4tqZwkNby9Fu7fbhWA4AW2mi3Lf ahnMHe1rCobeogZv9OBH/nYxtBDn9avMaYe8d82maGc6noeH4BpvrvFru+pZA8GF9qy4 1psAQTpS08fghMITAkqHQrsVyt6+h5sBcFXmR8jkimxdYNAppIbStB71vrG5LvML2/6c G5OGCCZcDjzanTpz/MuTRGoSL9eMvUr+Uq1iojZju6IwKTr2GGm9b6id7ZqqGqVFOZQM MO2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=VhJSSgKonMP8J+UZxJu16JLCrKr2Kl8xqPLRdnV/E1E=; b=UE4EzjzY0juLIDioEUbzBRR7w/od+VAvNYIjC4hTOdbbTgYw/s5mbprXdDyrJ4ddzf AB5aUFibap4bxcmLb2IH7c5XE6KaPwKVJ1+JASUpxYKBktkFKaiPy94EFGYmGvj1sbGZ qv4epw+ViGK3zidy3C3KRg6/dbNIE4ia/KTBlNazEzWm20xrDECGv5wchQesoHidH3Hz 0Pz0pmZxNEvet84LWJRq7Hv0PgCR9ATJ1dp7V+y/N4h1qK7OBs2T+vjBjk2WwlupGByj Q4iBQvSn+WDOv0XvXJBKPUBetZR/C3MToL/Gsp8dflwqBSjIfvYfIMvxshtHvMOk3FX+ nkqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=omvxUCpj; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w22si451709edq.69.2019.11.28.02.47.50; Thu, 28 Nov 2019 02:47:50 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=omvxUCpj; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726641AbfK1Krp (ORCPT + 8 others); Thu, 28 Nov 2019 05:47:45 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:52814 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727007AbfK1Kro (ORCPT ); Thu, 28 Nov 2019 05:47:44 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id xASAlf3b114627; Thu, 28 Nov 2019 04:47:41 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1574938061; bh=VhJSSgKonMP8J+UZxJu16JLCrKr2Kl8xqPLRdnV/E1E=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=omvxUCpjit39i96x4uwUHlYULwmB0QFBrhZ7775tf9iurIlU85A2hVImz+vyHsbjU xav8irukCcWfD4cCbo0z6ZTRPlSip3tCzZbjUQn5QD22f5g/1wWfvfu0H5Gp7TNy2x Qj60E2hjbR9ZqQZnXf2ou85upFPFjEJ0JB/zOS80= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xASAlfWO126347 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 28 Nov 2019 04:47:41 -0600 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 28 Nov 2019 04:47:41 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 28 Nov 2019 04:47:41 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id xASAlX3x098163; Thu, 28 Nov 2019 04:47:39 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Rob Herring , Anil Varughese , Roger Quadros , Jyri Sarha CC: , Subject: [PATCH v3 02/14] phy: cadence: Sierra: Make "phy_clk" and "sierra_apb" optional resources Date: Thu, 28 Nov 2019 16:16:36 +0530 Message-ID: <20191128104648.21894-3-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191128104648.21894-1-kishon@ti.com> References: <20191128104648.21894-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Certain platforms like TI J721E using Cadence Sierra Serdes doesn't provide explicit phy_clk and reset (APB reset) control. Make them optional here. Signed-off-by: Kishon Vijay Abraham I --- drivers/phy/cadence/phy-cadence-sierra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c index de10402f2931..bed68c25682f 100644 --- a/drivers/phy/cadence/phy-cadence-sierra.c +++ b/drivers/phy/cadence/phy-cadence-sierra.c @@ -193,7 +193,7 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev) platform_set_drvdata(pdev, sp); - sp->clk = devm_clk_get(dev, "phy_clk"); + sp->clk = devm_clk_get_optional(dev, "phy_clk"); if (IS_ERR(sp->clk)) { dev_err(dev, "failed to get clock phy_clk\n"); return PTR_ERR(sp->clk); @@ -205,7 +205,7 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev) return PTR_ERR(sp->phy_rst); } - sp->apb_rst = devm_reset_control_get(dev, "sierra_apb"); + sp->apb_rst = devm_reset_control_get_optional(dev, "sierra_apb"); if (IS_ERR(sp->apb_rst)) { dev_err(dev, "failed to get apb reset\n"); return PTR_ERR(sp->apb_rst);