From patchwork Wed Oct 16 11:31:06 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: 176458 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp7233749ill; Wed, 16 Oct 2019 04:32:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKJNVvJHOTAjXHZnH3MbFKhVKKGbf8fmhbcnjyyA3OueaiG2jq8cMPi/3uI1PdSKTcjq15 X-Received: by 2002:a50:ef17:: with SMTP id m23mr16522632eds.200.1571225522483; Wed, 16 Oct 2019 04:32:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571225522; cv=none; d=google.com; s=arc-20160816; b=jucZ2MYHB3mXZTIu/3eYEkCbxgIQ6M1nql8ji5/Z+47agpl5GuMcHCm29BT/C1qvYa b4y8Q7E6/AUpNS7Z16a/NOhp9sfUAfPXZ0DsogUuwpdbpektuxyYqu3RJL+yrUbHRpGk 4m1WNk24e+7PIEZzdPbGRyvyVjT2INwUohhUrHK0Znwl4q2Fq1PWON8LovpsUwzHHZT6 XugGSOmdGJTE9Yh1hAUq4D5P46LkwtPciUFSwqh/yk84Qn+6IsWw1nJ5hN4S6kjT36k2 OqByu9m6yA7f/KUBCMBwexFl6OCgpjix1p+ahKFvgA4wanhZswx56UhU3/NTBU224wAg 2JUA== 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=KX4iGBRCFV7D0Ta3JZeWBJVq7x+2WP7/vvc/Kv4KpHf2alhM57dpllP017NIZceIrY EYIFBk6ER4r+MoVAkjG+VvUhRacHyZ36eUkTxf9PnDqzDPyV/XJUf9yYsUSPFL4wZpRi aThi61iMVxcs0Y41NFsn8ezAGe6cKUfCsmXW1pSSho8xK55m0crjO01jp3csfYdcUCN0 4PbrQTFlS3ns6WGZPZ6XJipqnQv0jFrpALQyjm3s67Y+v3idLO17MXQsxvajSAV/zKFU Qy0db5iaEHjCtHKYqt+Ya4DAsbPFap/FQZ6uAsKEklA/blR5mTuccvFMmlrFSBA60wov 2xag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=jy+8qIr0; 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 bt6si15442387edb.69.2019.10.16.04.32.02; Wed, 16 Oct 2019 04:32:02 -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=jy+8qIr0; 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 S2404999AbfJPLb6 (ORCPT + 26 others); Wed, 16 Oct 2019 07:31:58 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:50324 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728372AbfJPLb4 (ORCPT ); Wed, 16 Oct 2019 07:31:56 -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 x9GBVsnt097071; Wed, 16 Oct 2019 06:31:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571225514; bh=VhJSSgKonMP8J+UZxJu16JLCrKr2Kl8xqPLRdnV/E1E=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=jy+8qIr01IM/gmiU+A50/bStAZe2NOW7T80EeRTY6vn/W1Kggku70tkQt5nJ9fTp8 PfESu9sXugfsj7sw5EQNc+I+dYbKlUQVou3VHBVjYz8I3EIDkLTMK/WmVzq4b011sc sdK6OwMy3AvUMdSOd5nIyOiwii3aPdADoaax72ug= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9GBVsN1079952 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 16 Oct 2019 06:31:54 -0500 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 16 Oct 2019 06:31:53 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE108.ent.ti.com (10.64.6.29) 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, 16 Oct 2019 06:31:47 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9GBVkm6097485; Wed, 16 Oct 2019 06:31:52 -0500 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Roger Quadros , Jyri Sarha CC: Anil Varughese , , Subject: [PATCH 02/13] phy: cadence: Sierra: Make "phy_clk" and "sierra_apb" optional resources Date: Wed, 16 Oct 2019 17:01:06 +0530 Message-ID: <20191016113117.12370-3-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191016113117.12370-1-kishon@ti.com> References: <20191016113117.12370-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);