[v2,3/3] of: property: Add in-ports/out-ports support to of_graph_get_port_parent()
Message ID | 20240207011803.2637531-4-saravanak@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-55790-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1930428dyb; Tue, 6 Feb 2024 17:19:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYhjMvUUwdXHE4RUimDFDu3E2M5tnquK7Guwi+bStZsyfYu9MQk/pvO64C9H/Gdg24Y3Xo X-Received: by 2002:ad4:5c4e:0:b0:68c:a48b:1837 with SMTP id a14-20020ad45c4e000000b0068ca48b1837mr4986106qva.56.1707268757139; Tue, 06 Feb 2024 17:19:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707268757; cv=pass; d=google.com; s=arc-20160816; b=Yhi4zThT4j+58mRUFH/to/4m5IppTdmWk9BQHOtPA2QxUSHypXuPWURGfxx3S5p4z8 RvoKcv0ee86MTSgGh9XINivWRjZdaSqW/GfDnE1blS9LYx1tW9WfYEKLMYncn9Agv3nS Q24StenAbIbLEAAI3zXo9tYis0KjiFCuM7yOT3FQDyBQ3PKPpNymr4yQsSObFqoi1wvd wVX0Uu0wHMU+glitYRoX9+y0Wxp60cjoLTKDAA9z6v/R3KRYtlegEm3SA62A1A2VN264 pU95UqfY2fTggVpHB+Co3acqIXQJugvgBH562QScWY/XBn8aLiIYGpMz8TN/nLWc96RK 0uyQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:references:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:in-reply-to:date :dkim-signature; bh=IALq/oq3h9hevE4KUuaY6CyXWslIu36itE2hrGdOodc=; fh=t6sQuURRABh0YfbEMgu04ki0+DB17f1yett9uB58gUc=; b=Wm3GDiuvxAPDumtBnrE2MCu8wuLhqnC12C0IVJBci9PtywWQz+vSxo+ynmi/RKtDcE DW+yl2CiUsCPaSb46A91X6sYeIjDYm1ftlB/ve0EmHNPXfVO9Ctw6UUjC/uZfQoflKGv PWL+Za+DPN0IMRCPHLVqSxzbr7mkWAEOL/wriqQllO6bq9FpnAy5RvhvRGN0esYV+7G4 FxX83iyd4j0hOCU3VmtGNn4nrfYgi+himw1siFK+XZ2kx9VfljkXX5dMEIGDCICfJUTd Caelq4Qhb0+kXlP3BdF/TwL18kHxV6LF2D/SQ7kcnnRykaw6NrlnaLVn9pK4GksyCATV PZhg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=E5jDfe4Q; arc=pass (i=1 spf=pass spfdomain=flex--saravanak.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-55790-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55790-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=2; AJvYcCWA4DzShUYbsEKz5ASVdaPJUKipYaOg462zWtclgiCmz8FSpLHLNBPxNNX0pF6+my9ugbPQSbUoClRDPQZCtp868ZCGWA== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id gs4-20020a056214226400b0068c46ab03c4si159426qvb.598.2024.02.06.17.19.17 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 17:19:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55790-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=E5jDfe4Q; arc=pass (i=1 spf=pass spfdomain=flex--saravanak.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-55790-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55790-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E8C2E1C246A1 for <ouuuleilei@gmail.com>; Wed, 7 Feb 2024 01:19:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 16EAD101C4; Wed, 7 Feb 2024 01:18:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="E5jDfe4Q" Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEEB4EEDA for <linux-kernel@vger.kernel.org>; Wed, 7 Feb 2024 01:18:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707268701; cv=none; b=HzmHQnk4cLGMHTMdFoIn0Z2h2pZ61iDIysZcPH802JmKQfh76ibVm3+wNJ6NCwjkvF2eabxTq8Y9UAw934LTtLdYePhFtEAxrFNglFP2nheMfEj6zNB29FGp0YeCVZquUlPqwZN+A3v4vSI8Y/Lm2hTApdeU3zZ0hJMn9Ug/HhA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707268701; c=relaxed/simple; bh=JJyqqsDhj00w4rvbp0+xvDd5ul7th/oRNUlKqIehj68=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Cc:Content-Type; b=AYsa6hCOpkC1v+tWrhTSE2vAfIyj87HBPQ79UiqJ1pW3YApac/2RFQIOERKgvWLYdZGIwXicDvAJWaE77b+NrrtbxipswSpTAJa2rkkKLi74GRd74vruubw9cVvN/D8myJcBuVIFW7NeeRnnJL84B0C9LNstSK/3ONPQm7ciZI0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--saravanak.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=E5jDfe4Q; arc=none smtp.client-ip=209.85.128.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--saravanak.bounces.google.com Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-60491e90830so654687b3.2 for <linux-kernel@vger.kernel.org>; Tue, 06 Feb 2024 17:18:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707268699; x=1707873499; darn=vger.kernel.org; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=IALq/oq3h9hevE4KUuaY6CyXWslIu36itE2hrGdOodc=; b=E5jDfe4QTJG4YayQayIPixvd9ItLqfrS5RRQcPItL8/NDiKG6yRM/W8eKiAxSyDZnu b4yjEQpoOcU3Q2omAWegWR7h81HwwhWuF6n07HPNOSDzzDM+v0/TjjwihmEWOjvWbV5R uA0jnxWx8LYpd7WvX/ewEAbVM5sF4ik4oOcPQ21KbddH7a+iedpS7km5CY8wUkjrvJsA W3h+ZfhfEBIPknIsd8ejRv1ALQ7lrlKEdMly1DIQ320xNbg9Tsb7XPwQS95y2axZm+Ut gOgQNy5JsRPMpM4hFH0EvhEbo56TMEUc7wTQ/tGcqob5AURFq3xtOP2kL4ojRn9aja1W e95g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707268699; x=1707873499; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IALq/oq3h9hevE4KUuaY6CyXWslIu36itE2hrGdOodc=; b=rUYA59bW5sem+rg++EnulCiPbUHrZ/pG2FpphKn/LQmvuDs91bEXesRV+TBGdFLvXS AOy7JM5ihmQbOo6edV02Xk20BRlYc1RXfEWldy1LLFSj+9Nr8itkN87W+ZYllK7j58p4 x9ss7/mBL/uL1QDtkbz5d3V6hz1xyft5rf4yfteLqQ67IFSp/+mF+Rkk2bRuI5TiSLQZ HiyVrcy5k22D4aLCPzIOD72mdf2st8R+tXCKKTwCoKr5iZNcoVRJTs9xrznJmDnZEve8 BRYxSnaJ0yYhpoeBzUBFi+nu5ILRCnMbEkoSUD9wiWgbugjNhCB9r2N/YYPmnrHsEONo o7MA== X-Gm-Message-State: AOJu0Ywrfd5bXbAmK5bJuUh/08olgRab5ID8KdqiSFzyjFqhf+a9WQu1 9+M4L5gcx6aRol50L4NMbBRMuXjkfobh6MN1HZ+7xIyJVZBcsJgpnm397faLps2+M4uefL+dJwW i9dHcHF1kIqeQFg== X-Received: from saravanak.san.corp.google.com ([2620:15c:2d:3:dc84:66b8:120:935a]) (user=saravanak job=sendgmr) by 2002:a05:6902:168b:b0:dc6:d7a2:bc2 with SMTP id bx11-20020a056902168b00b00dc6d7a20bc2mr141599ybb.9.1707268698853; Tue, 06 Feb 2024 17:18:18 -0800 (PST) Date: Tue, 6 Feb 2024 17:18:02 -0800 In-Reply-To: <20240207011803.2637531-1-saravanak@google.com> Message-Id: <20240207011803.2637531-4-saravanak@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> Mime-Version: 1.0 References: <20240207011803.2637531-1-saravanak@google.com> X-Mailer: git-send-email 2.43.0.594.gd9cf4e227d-goog Subject: [PATCH v2 3/3] of: property: Add in-ports/out-ports support to of_graph_get_port_parent() From: Saravana Kannan <saravanak@google.com> To: Rob Herring <robh+dt@kernel.org>, Frank Rowand <frowand.list@gmail.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Saravana Kannan <saravanak@google.com> Cc: Xu Yang <xu.yang_2@nxp.com>, kernel-team@android.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790201044380681608 X-GMAIL-MSGID: 1790201044380681608 |
Series |
Improve remote-endpoint parsing
|
|
Commit Message
Saravana Kannan
Feb. 7, 2024, 1:18 a.m. UTC
Similar to the existing "ports" node name, coresight device tree bindings
have added "in-ports" and "out-ports" as standard node names for a
collection of ports.
Add support for these name to of_graph_get_port_parent() so that
remote-endpoint parsing can find the correct parent node for these
coresight ports too.
Signed-off-by: Saravana Kannan <saravanak@google.com>
---
drivers/of/property.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
On Tue, Feb 6, 2024 at 5:18 PM Saravana Kannan <saravanak@google.com> wrote: > > Similar to the existing "ports" node name, coresight device tree bindings > have added "in-ports" and "out-ports" as standard node names for a > collection of ports. > > Add support for these name to of_graph_get_port_parent() so that > remote-endpoint parsing can find the correct parent node for these > coresight ports too. > > Signed-off-by: Saravana Kannan <saravanak@google.com> Greg, I saw that you pulled the previous 2 patches in this series to 6.1, 6.6 and 6.7 kernel branches. I really should have added both of those Fixes tag to this patch too. Can you please pull in the patch to those stable branches too? Thanks, Saravana > --- > drivers/of/property.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/of/property.c b/drivers/of/property.c > index 7bb2d8e290de..39a3ee1dfb58 100644 > --- a/drivers/of/property.c > +++ b/drivers/of/property.c > @@ -763,7 +763,9 @@ struct device_node *of_graph_get_port_parent(struct device_node *node) > /* Walk 3 levels up only if there is 'ports' node. */ > for (depth = 3; depth && node; depth--) { > node = of_get_next_parent(node); > - if (depth == 2 && !of_node_name_eq(node, "ports")) > + if (depth == 2 && !of_node_name_eq(node, "ports") && > + !of_node_name_eq(node, "in-ports") && > + !of_node_name_eq(node, "out-ports")) > break; > } > return node; > -- > 2.43.0.594.gd9cf4e227d-goog >
On Tue, Feb 20, 2024 at 04:47:35PM -0800, Saravana Kannan wrote: > On Tue, Feb 6, 2024 at 5:18 PM Saravana Kannan <saravanak@google.com> wrote: > > > > Similar to the existing "ports" node name, coresight device tree bindings > > have added "in-ports" and "out-ports" as standard node names for a > > collection of ports. > > > > Add support for these name to of_graph_get_port_parent() so that > > remote-endpoint parsing can find the correct parent node for these > > coresight ports too. > > > > Signed-off-by: Saravana Kannan <saravanak@google.com> > > Greg, > > I saw that you pulled the previous 2 patches in this series to 6.1, > 6.6 and 6.7 kernel branches. I really should have added both of those > Fixes tag to this patch too. > > Can you please pull in the patch to those stable branches too? Sure, what's the git id? thanks, greg k-h
On Wed, Feb 21, 2024 at 08:00:00AM +0100, Greg Kroah-Hartman wrote: > On Tue, Feb 20, 2024 at 04:47:35PM -0800, Saravana Kannan wrote: > > On Tue, Feb 6, 2024 at 5:18 PM Saravana Kannan <saravanak@google.com> wrote: > > > > > > Similar to the existing "ports" node name, coresight device tree bindings > > > have added "in-ports" and "out-ports" as standard node names for a > > > collection of ports. > > > > > > Add support for these name to of_graph_get_port_parent() so that > > > remote-endpoint parsing can find the correct parent node for these > > > coresight ports too. > > > > > > Signed-off-by: Saravana Kannan <saravanak@google.com> > > > > Greg, > > > > I saw that you pulled the previous 2 patches in this series to 6.1, > > 6.6 and 6.7 kernel branches. I really should have added both of those > > Fixes tag to this patch too. > > > > Can you please pull in the patch to those stable branches too? > > Sure, what's the git id? Nevermind, I found it...
diff --git a/drivers/of/property.c b/drivers/of/property.c index 7bb2d8e290de..39a3ee1dfb58 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -763,7 +763,9 @@ struct device_node *of_graph_get_port_parent(struct device_node *node) /* Walk 3 levels up only if there is 'ports' node. */ for (depth = 3; depth && node; depth--) { node = of_get_next_parent(node); - if (depth == 2 && !of_node_name_eq(node, "ports")) + if (depth == 2 && !of_node_name_eq(node, "ports") && + !of_node_name_eq(node, "in-ports") && + !of_node_name_eq(node, "out-ports")) break; } return node;