Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp359036pxf; Wed, 10 Mar 2021 07:48:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQaQhtZQXg4zHY5xw0TF0tdeO0ur0+BescaAGawY6s7lofCrpL3oP0gdCw2A5sf99UsBte X-Received: by 2002:a17:906:1d55:: with SMTP id o21mr4356750ejh.485.1615391309786; Wed, 10 Mar 2021 07:48:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615391309; cv=none; d=google.com; s=arc-20160816; b=dym+Lt3tapEB4MLVXAVa5MFzH6fk7PbZ7VsXnRyjJj69XzktTpQa422jSgZ90s3ceJ 5x9ZASFmyxUOOwxFg5B1UrPr5phYjhXrEQcV1nkV76pSbNNHKS5wX+uM/4oOuM2RK3gO 9VB9Jb+8d4Hl+Br/f3p2dxKyx0AoNozXFXLX4dOwBa/iqKSYaYgf1mus5RpzqX+9HOFh hCJMWwEChdXo3WBlO6T8Wy547f9Mq/Lt7K0/tLZYWY5Y/UZKfPzvnpFdg/0PargFz61I PE+4UtAv10aBdZPnx8ZRpkSs/hB/un4VAtfMssDcacW/VWn8S0SDGavhlIDYpO+IYcj6 FTRw== 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=OsKa0EDwQKMOxN4rn2UsJ4wTaESxeSKXJwtpa+eVAPs=; b=FrAy+sOvMTacK+A9pe+7o7YLU5SQF3mQKrOMtZVjdyYbs1Q2tGEAost5VD/5tt/cmZ uJty7otbVkMKpa+tkPj5VOGajfTgLQzoT4YEGYLDb28XilSA4Xr+zOUgUy8QipyZS/Gz BsKgpWP/6tbbu0lbdEd4tFvDKg8z+BYX3fTh03NaC3R4+mS5XIFx/c2IcjNpJQWLSm4f PXsOmPvcLtORJ6KJ8O7diYgl8E2in1iR+foEiQMcmKfk6fWRJJY4ayReuT9pk7R3hylb oeRc/T0FV903r7jVRlYTXpL/YeiOPXePizKyt+TFafXOuf7gR5YxNa4xTd1c/ualaDWl QDEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=AtZ3bIh+; 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 m19si11958005eds.451.2021.03.10.07.48.07; Wed, 10 Mar 2021 07:48:29 -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=AtZ3bIh+; 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 S233269AbhCJPqr (ORCPT + 99 others); Wed, 10 Mar 2021 10:46:47 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:43792 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233219AbhCJPqX (ORCPT ); Wed, 10 Mar 2021 10:46:23 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 12AFkIfu117261; Wed, 10 Mar 2021 09:46:18 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1615391178; bh=OsKa0EDwQKMOxN4rn2UsJ4wTaESxeSKXJwtpa+eVAPs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=AtZ3bIh+10iAM0fNznHbBw845yGKpgVo6EJCd1H/v5rBVjZAOwqWEstKb6FHgGDaS UrynFz4tR41Z9P+zZb9Sr/X8XMjRl4yKhARUDnVI6jArytn985vi+bgShPRJR6GEZE mZvxlDFHGfHgH6ShRNormwBW+zzrj7iY5jdXBENw= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 12AFkIKE014694 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 10 Mar 2021 09:46:18 -0600 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Wed, 10 Mar 2021 09:46:18 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Wed, 10 Mar 2021 09:46:18 -0600 Received: from a0393678-ssd.dhcp.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 12AFk2KS066370; Wed, 10 Mar 2021 09:46:15 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Vinod Koul , Rob Herring , Philipp Zabel , Swapnil Jakhade CC: , , Lokesh Vutla Subject: [PATCH v6 04/13] phy: ti: j721e-wiz: Get PHY properties only for "phy" or "link" subnode Date: Wed, 10 Mar 2021 21:15:49 +0530 Message-ID: <20210310154558.32078-5-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210310154558.32078-1-kishon@ti.com> References: <20210310154558.32078-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 1bb73822f44a..659597645201 100644 --- a/drivers/phy/ti/phy-j721e-wiz.c +++ b/drivers/phy/ti/phy-j721e-wiz.c @@ -1102,6 +1102,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