Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4753097pxu; Mon, 21 Dec 2020 23:07:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxe/NvSGoTRoqtgH+m01IOdSWCRk3p4+8y+PPoqPexyy0e4pMLA5aSGFxqK/mEZNsWgxA27 X-Received: by 2002:a17:906:1955:: with SMTP id b21mr18588287eje.236.1608620857550; Mon, 21 Dec 2020 23:07:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608620857; cv=none; d=google.com; s=arc-20160816; b=LSkpyzy7Y9cS+UFzSsxRw37dtjV9f6LrkxCGqa20NqiWY9fukDxUmdTkcYJ/g7xbOT +8nnX+w/eRnLwTE5/xviJWHK2mR/KFihIW30ibAbUXF+58nrnfFCGnbF66+nqLKEv9E5 JLmmd7PKlulXdQlioh86Ahk7HjU16nETUNbzMiufXV65PxMxPbReJWPttbdSWpaZmOLv ZValZnZRM85U5i0AkZEvXbDk+KLhwbCUaEeFAa2c+HwRV22AtOmQWSIjyVDcXimL4P8R QpaEXZukcqc4vkYatckGAyHLbO8E4iCPV8PKcRk8ZZsFg3J0TxfH0XyJlNqWUFfxFnjN dx0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=FjCTHLq/sEj9KXmxRwSejCjWFaAdBEX/mJW7iTNR8qs=; b=B3b/bTtDMAF7DAfZlKinbenNnYViYWHktYA9bBmjtj+daB9I1lr7QLoi/qLwiJZxT0 JL/DILri0ciJ7/hEmAu0Q0lGqfoVyyHEMj6MaNzXR/+dl/GHK6JATbs276MvKrRc7bAV knpazoedPs45V3uN296mawwEnGKTti6pR/MntYSCZjztc9cXef96JTB8kFjM309rUWu8 dfUEzqHlPAdPVbGPsLUG/kTRQTt/AJF7VtRvZULuY3mVqsemRgcJUzVAEXKRa0IN+NrE L/cy56kGtrhuxxhOAVdxP+XfYj2AHDFoiSmOW22LGfWtKpSpmxEGd5TudNMpRUcGZSsD nTaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=kqL+3iEV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id u9si11212420edv.418.2020.12.21.23.07.14; Mon, 21 Dec 2020 23:07:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=kqL+3iEV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726194AbgLVHGa (ORCPT + 99 others); Tue, 22 Dec 2020 02:06:30 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:53870 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726123AbgLVHG2 (ORCPT ); Tue, 22 Dec 2020 02:06:28 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0BM75fna064140; Tue, 22 Dec 2020 01:05:41 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1608620741; bh=FjCTHLq/sEj9KXmxRwSejCjWFaAdBEX/mJW7iTNR8qs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=kqL+3iEVg69buo1X5wufY3l41SA7r7u0t9UODIe3lYXbGfLIIUgLzr4vaQVHDL4uu 2fsmCu+ikzM6lX+fHL/zOt+LjizHmXPvIQQEkPybq2HCaVyVwIDxt9gLVxb6S5Hatc H5du1xUNhFs6y/fCI6oY4g+qfB5PAVNnF95+schA= Received: from DFLE101.ent.ti.com (dfle101.ent.ti.com [10.64.6.22]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0BM75fc1108684 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 22 Dec 2020 01:05:41 -0600 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Tue, 22 Dec 2020 01:05:40 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Tue, 22 Dec 2020 01:05:41 -0600 Received: from a0393678-ssd.dal.design.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 0BM75N7D050344; Tue, 22 Dec 2020 01:05:38 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Swapnil Jakhade , , , CC: Nishanth Menon , Philipp Zabel Subject: [PATCH v2 04/14] phy: ti: j721e-wiz: Get PHY properties only for "phy" or "link" subnode Date: Tue, 22 Dec 2020 12:35:10 +0530 Message-ID: <20201222070520.28132-5-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201222070520.28132-1-kishon@ti.com> References: <20201222070520.28132-1-kishon@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "serdes" node (child node of WIZ) can have sub-nodes for representing links or it can have sub-nodes for representing the various clocks within the serdes. Instead of trying to read "reg" from every child node used for assigning "lane_phy_type", read only if the child node's name is "phy" or "link" subnode. Ideally all PHY dt nodes should have node name as "phy", however existing devicetree used "link" as subnode. So in order to maintain old DT compatibility get PHY properties for "phy" or "link" subnode. Signed-off-by: Kishon Vijay Abraham I --- drivers/phy/ti/phy-j721e-wiz.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/phy/ti/phy-j721e-wiz.c b/drivers/phy/ti/phy-j721e-wiz.c index a75433b459dd..2a03191eac64 100644 --- a/drivers/phy/ti/phy-j721e-wiz.c +++ b/drivers/phy/ti/phy-j721e-wiz.c @@ -787,6 +787,10 @@ static int wiz_get_lane_phy_types(struct device *dev, struct wiz *wiz) u32 reg, num_lanes = 1, phy_type = PHY_NONE; int ret, i; + if (!(of_node_name_eq(subnode, "phy") || + of_node_name_eq(subnode, "link"))) + continue; + ret = of_property_read_u32(subnode, "reg", ®); if (ret) { dev_err(dev, -- 2.17.1