From patchwork Wed Oct 23 12:57:23 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: 177276 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp687861ill; Wed, 23 Oct 2019 05:58:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyC6XV1+Ss3AP2p+PZIWO5JhjdDSnhXNoD/7xPSWEME0mevuckfvrbKHHt0aGGadE4MiK/g X-Received: by 2002:a50:98c6:: with SMTP id j64mr37290094edb.295.1571835500521; Wed, 23 Oct 2019 05:58:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571835500; cv=none; d=google.com; s=arc-20160816; b=q8S7l7zRRe9mpXL1LXALo0MW0Plk+rHyCnk8YADr5igqUuZpUTBxD3sKoQnFuuIP5S EP8kcQGesgSTNMPNxfMlEy+HrO0e2X1yzcW9Zmqh3WMjDEZEuepAr6+8Z3CDOIoIIhmj nazbBGZqThgwbNpY9E6nASMwfV4Ct2iYx/XP0kZJUK8j2zjWvdYviCYo+0vQieZftXtc pG9i9YlJdUZf4jW03bW7dkDx4KqsCP+R1jslefzKL8Ka95S7wXyTK19MRP2YMWdVv744 zB9fkynZ2zlwKE/SpPSWtWHK/bG6GXlhnYfA4/0CHHd1JLRvD1SEkBUjUgubtPW/W1Fy B05Q== 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=yKDxIFCOtvP5chZUq9q/y0viAD8CZTk4kXC6C8jLugZp7uQzPqE5SGXY5tvF4U8q8u 3yXodEMvF3M96Z2zfpPAFHxuHttuHIqV+PxgaLyDt7R2nTKj3QIf82Rb/WGXQjor4mHe 6OL7/dceMpmhKDKyfH4rwIM1n9ULcf8cPXe7Hn7z5AlJVqRyckdRiTEkK0yJQ4uSvxUF Zp9GbFoHLBgr0mBP+0c7NF6jlMvEBedrpj7nhetK/348HTP8uwg/++Ja/duQX8TRKFJC GQ0Xl1V4ec3X94rYMw9/ysNfmICUdF5IlG8GXx5tk1p24HDPV3n4qkDFPCV1SUBMrvxM Q76A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=b7Q+JfpS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 r12si2321391edi.272.2019.10.23.05.58.20; Wed, 23 Oct 2019 05:58:20 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=b7Q+JfpS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S2404512AbfJWM6R (ORCPT + 26 others); Wed, 23 Oct 2019 08:58:17 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:52228 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404484AbfJWM6Q (ORCPT ); Wed, 23 Oct 2019 08:58:16 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9NCwDKq120273; Wed, 23 Oct 2019 07:58:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571835493; bh=VhJSSgKonMP8J+UZxJu16JLCrKr2Kl8xqPLRdnV/E1E=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=b7Q+JfpSXY8FVjpXj+BgWjp1cgFxPW+HCCU/Ld9fW1YEC9QVHvzy+X3UjGDuQdChN CuaerA1RHXXbBpiA04uyIaLDvLDKdF9ft5AgGEAG0GAKjrkC1v8xueyTYKQhQ4ddjy c9P7BLWO0cFKfzWPCoq1KrZNAnUfnFYkiAGOXYCM= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9NCwDE6042371 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 23 Oct 2019 07:58:13 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) 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.1713.5; Wed, 23 Oct 2019 07:58:12 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Wed, 23 Oct 2019 07:58:02 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9NCw5o6061147; Wed, 23 Oct 2019 07:58:10 -0500 From: Kishon Vijay Abraham I To: Rob Herring , Kishon Vijay Abraham I , Roger Quadros , Jyri Sarha CC: Anil Varughese , , Subject: [PATCH v2 02/14] phy: cadence: Sierra: Make "phy_clk" and "sierra_apb" optional resources Date: Wed, 23 Oct 2019 18:27:23 +0530 Message-ID: <20191023125735.4713-3-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191023125735.4713-1-kishon@ti.com> References: <20191023125735.4713-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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);