From patchwork Mon Dec 16 09:57:00 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: 181647 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp4091209ile; Mon, 16 Dec 2019 01:56:12 -0800 (PST) X-Google-Smtp-Source: APXvYqx0/A289gwOails3QBxgA44AjNsDyZOJjPc1OCEUQBvoZ7v1n84J/x56oCytoR2ZRsDm+j9 X-Received: by 2002:a9d:7f16:: with SMTP id j22mr11579800otq.256.1576490172898; Mon, 16 Dec 2019 01:56:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576490172; cv=none; d=google.com; s=arc-20160816; b=OdCPG/dN+zQh0kjIU0i4Gsbwn6FXGA1e616AMG8w9FbFiDeM8KqxV76ON8q/cHg4ka vLeLd7etc6MwUIaCtYPBPwXESNl6JFO7JXNtxPsklWvNDSGDSI+9RBI2mThjnj1ihDIH EVg29lStH6sccpDvr0FzXAglQeCYtrVdlRxkEGefTN4BUpY4HQuDiA7gXuLHUCq/khhF g7fqs/jZiW3VjWWd4/zOb+vgUhuwz5/Sc2Vlbc/AmV8YTe5WrngdkxZozN16QaqZVVeq 2q1iqB0TafaWDoxLZ00z0j56k9zYlNRbIbrBTY8UFea2Hm7PhtjTdpcB92Gm9C9ABfws j0Pg== 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=M4EViW6TGF3ksbxMYEoGTFbjtS5EkWQAdR6sZpjLk1EXjtYGEG1o8+/jJv7JivpyC7 EsJfBKSw8IkXFhg9AWWOFpFvK+qnLP0NGmrtMariQRoDITUzLatKMx6fQ+5vNJQXVnZ+ YiYtpogYqdAW9vyLN2of3TWJdKIny/4MAh6Iy/QGp/NP57Hn5AgghmTL5p8//HX50nJZ vTtGA1K4KqIKzbY2RMYG7poaCnGtzeRUdRhc+bWCaha3LEPFJze94wSsalywhVBPMbpD VDZ24liILtoMtNKLhBW727mTO/LCKTlU0eZFQ5ifirdSO62YgYrGJoTfhrNS/tKQA5G/ tvTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=s7Uj9JcN; 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 n137si10155669oig.127.2019.12.16.01.56.12; Mon, 16 Dec 2019 01:56:12 -0800 (PST) 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=s7Uj9JcN; 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 S1727189AbfLPJ4L (ORCPT + 27 others); Mon, 16 Dec 2019 04:56:11 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:58734 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727170AbfLPJ4I (ORCPT ); Mon, 16 Dec 2019 04:56:08 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id xBG9u3LF106027; Mon, 16 Dec 2019 03:56:03 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1576490164; bh=VhJSSgKonMP8J+UZxJu16JLCrKr2Kl8xqPLRdnV/E1E=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=s7Uj9JcN+ZvQ/erGMxSB7Xb91kJBeW0uhi0jCKddmsvtHZ4RL2tK1x5hZNIHmjyYG 5U/oI0e95BTaibvR0yJfN8cS03SS8WRvQK1B+kZfi4d4WQpSI92EozJO7BxuSLaeSW KVCkMEa0AW4pXxBn/xl3MNoT0zbERn4JMXiv92zY= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xBG9u30U124709 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 16 Dec 2019 03:56:03 -0600 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Mon, 16 Dec 2019 03:56:02 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE109.ent.ti.com (10.64.6.30) 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; Mon, 16 Dec 2019 03:56:02 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBG9tsJL084408; Mon, 16 Dec 2019 03:56:00 -0600 From: Kishon Vijay Abraham I To: Rob Herring , Anil Varughese , Roger Quadros , Jyri Sarha CC: , Kishon Vijay Abraham I , , Subject: [PATCH v4 02/14] phy: cadence: Sierra: Make "phy_clk" and "sierra_apb" optional resources Date: Mon, 16 Dec 2019 15:27:00 +0530 Message-ID: <20191216095712.13266-3-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191216095712.13266-1-kishon@ti.com> References: <20191216095712.13266-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);