From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Subject: Re: [PATCH v5 1/6] of_graph: add of_graph_get_local_port() Date: Thu, 30 Apr 2020 09:10:10 -0500 Message-ID: <20200430141010.GA4602@bogus> References: <20200418170703.1583-1-digetx@gmail.com> <20200418170703.1583-2-digetx@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20200418170703.1583-2-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Dmitry Osipenko Cc: Thierry Reding , Sam Ravnborg , Laurent Pinchart , Frank Rowand , dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-tegra@vger.kernel.org On Sat, 18 Apr 2020 20:06:58 +0300, Dmitry Osipenko wrote: > In some case, like a DRM display code for example, it's useful to silently > check whether port node exists at all in a device-tree before proceeding > with parsing the graph. > > This patch adds of_graph_get_local_port() which returns pointer to a local > port node, or NULL if graph isn't specified in a device-tree for a given > device node. > > Signed-off-by: Dmitry Osipenko > --- > drivers/of/property.c | 32 +++++++++++++++++++++++--------- > include/linux/of_graph.h | 7 +++++++ > 2 files changed, 30 insertions(+), 9 deletions(-) > Reviewed-by: Rob Herring From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7476C28CBC for ; Thu, 30 Apr 2020 14:10:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BC9A62137B for ; Thu, 30 Apr 2020 14:10:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588255815; bh=lCkkjbTRKnupktbhhwm1QNoArUgsPT25OPIGy+WhnWU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=P6nkQHwm9WDIaMSpX9ZjLGrWfv2XemebUBOuguXV8/H7T1Qmu0EgYmEnNAZzryHvM dVKIyGVy+BR6ly0M2h72wKUFh9qiy3vyxaiKCs2W5rmanijVyab7psLOdX4NaDE9Ct C+I2Am0NsIjD8DZl/zq1I/XGkbLw1XPmUFenfyMA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728414AbgD3OKO (ORCPT ); Thu, 30 Apr 2020 10:10:14 -0400 Received: from mail-oo1-f67.google.com ([209.85.161.67]:45620 "EHLO mail-oo1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728141AbgD3OKN (ORCPT ); Thu, 30 Apr 2020 10:10:13 -0400 Received: by mail-oo1-f67.google.com with SMTP id 190so1297688ooa.12; Thu, 30 Apr 2020 07:10:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=6aiOkcIgJAWhCqfCs33Rhe1wkSnQyKwXVAe/pUh2Rrw=; b=tEabOy9KM9d7LRpLuowDfHa3grtUQXFhRb2NhOXb1jC+n25OcJI/CPHVJ2hoGBL0AV bQZW/AEkMCJJJCJmbkLjqJSybjjF39nfoDb+1zec5tQY2YDd/+HUyVb1PL/mb8Vy6g1j k3EFVdk01IO5HzTctxpG1qfP8Pm7Dc2uipe9q82d6X9Y4QKiPcXp77XC5ODDIE4KEAXT byEjM2RxzePIllwIxe4Bk5jUIcELo27BI1dF9gwuR8D7SY0pK/5nqvf/kLmEKBInWM82 0X5jY3D2PEsJODv7obzXkopLojx4QLHNArVJVGf2lGAz9wzugmwebeYGTKC7bFTBlPfk ZhcQ== X-Gm-Message-State: AGi0PubzrAtthmqGA7SayY2TyG7N3vGebiIiJPT3tEW3YuyDOG3CVyfw zo/nZN/nKzfzwvMzoL0ez6hLSPE= X-Google-Smtp-Source: APiQypIlZrdNDKXt4h5JYSoYrTTeKI8v+e+CVvcep7L1dYna5MbvAQ/q4ekiXc5lL7JJyjUKWiE5Xg== X-Received: by 2002:a4a:390b:: with SMTP id m11mr2952624ooa.2.1588255811640; Thu, 30 Apr 2020 07:10:11 -0700 (PDT) Received: from rob-hp-laptop (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id m16sm1304134oou.44.2020.04.30.07.10.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2020 07:10:10 -0700 (PDT) Received: (nullmailer pid 4677 invoked by uid 1000); Thu, 30 Apr 2020 14:10:10 -0000 Date: Thu, 30 Apr 2020 09:10:10 -0500 From: Rob Herring To: Dmitry Osipenko Cc: Thierry Reding , Sam Ravnborg , Laurent Pinchart , Frank Rowand , dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 1/6] of_graph: add of_graph_get_local_port() Message-ID: <20200430141010.GA4602@bogus> References: <20200418170703.1583-1-digetx@gmail.com> <20200418170703.1583-2-digetx@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200418170703.1583-2-digetx@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Sat, 18 Apr 2020 20:06:58 +0300, Dmitry Osipenko wrote: > In some case, like a DRM display code for example, it's useful to silently > check whether port node exists at all in a device-tree before proceeding > with parsing the graph. > > This patch adds of_graph_get_local_port() which returns pointer to a local > port node, or NULL if graph isn't specified in a device-tree for a given > device node. > > Signed-off-by: Dmitry Osipenko > --- > drivers/of/property.c | 32 +++++++++++++++++++++++--------- > include/linux/of_graph.h | 7 +++++++ > 2 files changed, 30 insertions(+), 9 deletions(-) > Reviewed-by: Rob Herring From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E441BC47247 for ; Thu, 30 Apr 2020 14:10:14 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C102F206D9 for ; Thu, 30 Apr 2020 14:10:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C102F206D9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F11636E90C; Thu, 30 Apr 2020 14:10:13 +0000 (UTC) Received: from mail-oo1-f68.google.com (mail-oo1-f68.google.com [209.85.161.68]) by gabe.freedesktop.org (Postfix) with ESMTPS id 605D86E90C for ; Thu, 30 Apr 2020 14:10:12 +0000 (UTC) Received: by mail-oo1-f68.google.com with SMTP id i9so1306627ool.5 for ; Thu, 30 Apr 2020 07:10:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=6aiOkcIgJAWhCqfCs33Rhe1wkSnQyKwXVAe/pUh2Rrw=; b=iwZs2898/0B3LckfyXXdEXXECu1OsV+SCqzXxxAHKMT2kqXuqfHysINmYAUi/UUJ8E /HdUxP+rGKdnaNQ4uCV2ZIgUFskJa4FleKhA41ee+h8zGAo2c+7h39bkjBPi+I16H4WA mhGunnTpVAB7z6tzlpzdsGH3UpjG4S2ojEenzSezsC5GXsF5Dv1oB7M+px3cXt1s0DXo 9xPmPw9SzceNXieNwwggn2BelttYD60f1aYbZnevOaM51/uWWxktNi3RVpv8J/Fv9ErD c80iNpZsFWNxZUSKobF1FtsMDyMsFRk/LilPTLQI/A13Ezb7A0R8MVksC4Bxf9sGUc0E VbiQ== X-Gm-Message-State: AGi0PuZX2VSbsoBVEcOdvS4sRVusVi2Sj0bRsj7Tay1Ol+4CxxAZG41U L0y/lX//5sLMo49niZBxpA== X-Google-Smtp-Source: APiQypIlZrdNDKXt4h5JYSoYrTTeKI8v+e+CVvcep7L1dYna5MbvAQ/q4ekiXc5lL7JJyjUKWiE5Xg== X-Received: by 2002:a4a:390b:: with SMTP id m11mr2952624ooa.2.1588255811640; Thu, 30 Apr 2020 07:10:11 -0700 (PDT) Received: from rob-hp-laptop (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id m16sm1304134oou.44.2020.04.30.07.10.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2020 07:10:10 -0700 (PDT) Received: (nullmailer pid 4677 invoked by uid 1000); Thu, 30 Apr 2020 14:10:10 -0000 Date: Thu, 30 Apr 2020 09:10:10 -0500 From: Rob Herring To: Dmitry Osipenko Subject: Re: [PATCH v5 1/6] of_graph: add of_graph_get_local_port() Message-ID: <20200430141010.GA4602@bogus> References: <20200418170703.1583-1-digetx@gmail.com> <20200418170703.1583-2-digetx@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200418170703.1583-2-digetx@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Sam Ravnborg , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Thierry Reding , Laurent Pinchart , linux-tegra@vger.kernel.org, Frank Rowand Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Sat, 18 Apr 2020 20:06:58 +0300, Dmitry Osipenko wrote: > In some case, like a DRM display code for example, it's useful to silently > check whether port node exists at all in a device-tree before proceeding > with parsing the graph. > > This patch adds of_graph_get_local_port() which returns pointer to a local > port node, or NULL if graph isn't specified in a device-tree for a given > device node. > > Signed-off-by: Dmitry Osipenko > --- > drivers/of/property.c | 32 +++++++++++++++++++++++--------- > include/linux/of_graph.h | 7 +++++++ > 2 files changed, 30 insertions(+), 9 deletions(-) > Reviewed-by: Rob Herring _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel