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=-11.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 40FC3C433E4 for ; Wed, 15 Jul 2020 20:58:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2AECD20771 for ; Wed, 15 Jul 2020 20:58:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726670AbgGOU6h (ORCPT ); Wed, 15 Jul 2020 16:58:37 -0400 Received: from retiisi.org.uk ([95.216.213.190]:53114 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726424AbgGOU6h (ORCPT ); Wed, 15 Jul 2020 16:58:37 -0400 Received: from valkosipuli.localdomain (valkosipuli.retiisi.org.uk [IPv6:2a01:4f9:c010:4572::80:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hillosipuli.retiisi.org.uk (Postfix) with ESMTPS id DB69B634C87; Wed, 15 Jul 2020 23:57:17 +0300 (EEST) Received: from sailus by valkosipuli.localdomain with local (Exim 4.92) (envelope-from ) id 1jvoSr-000386-U6; Wed, 15 Jul 2020 23:57:17 +0300 Date: Wed, 15 Jul 2020 23:57:17 +0300 From: Sakari Ailus To: "Rafael J. Wysocki" Cc: Laurent Pinchart , linux-media@vger.kernel.org, Linux-Renesas , Jacopo Mondi , Niklas =?iso-8859-1?Q?S=F6derlund?= , Kieran Bingham , Lad Prabhakar , "Rafael J. Wysocki" , "devicetree@vger.kernel.org" , ACPI Devel Maling List Subject: Re: [PATCH v4 1/4] device property: Add a function to test is a fwnode is a graph endpoint Message-ID: <20200715205717.GF836@valkosipuli.retiisi.org.uk> References: <20200701062140.12953-1-laurent.pinchart+renesas@ideasonboard.com> <20200701062140.12953-2-laurent.pinchart+renesas@ideasonboard.com> <20200701073405.GB836@valkosipuli.retiisi.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Rafael, On Wed, Jul 01, 2020 at 02:19:21PM +0200, Rafael J. Wysocki wrote: > On Wed, Jul 1, 2020 at 9:34 AM Sakari Ailus wrote: > > > > Hi Laurent, > > > > On Wed, Jul 01, 2020 at 09:21:37AM +0300, Laurent Pinchart wrote: > > > Drivers may need to test if a fwnode is a graph endpoint. To avoid > > > hand-written solutions that wouldn't work for all fwnode types, add a > > > new fwnode_graph_is_endpoint() function for this purpose. We don't need > > > to wire it up to different backends for OF and ACPI for now, as the > > > implementation can simply be based on checkout the presence of a > > > remote-endpoint property. > > > > > > Signed-off-by: Laurent Pinchart > > > --- > > > include/linux/property.h | 5 +++++ > > > 1 file changed, 5 insertions(+) > > > > > > diff --git a/include/linux/property.h b/include/linux/property.h > > > index 10d03572f52e..9f805c442819 100644 > > > --- a/include/linux/property.h > > > +++ b/include/linux/property.h > > > @@ -389,6 +389,11 @@ struct fwnode_handle * > > > fwnode_graph_get_remote_node(const struct fwnode_handle *fwnode, u32 port, > > > u32 endpoint); > > > > > > +static inline bool fwnode_graph_is_endpoint(struct fwnode_handle *fwnode) > > > +{ > > > + return fwnode_property_present(fwnode, "remote-endpoint"); > > > +} > > > + > > > /* > > > * Fwnode lookup flags > > > * > > > > Thanks for the patch. I've bounced it to devicetree and linux-acpi lists > > (now cc'd) --- hope that works. > > > > Rafael: do you think this simple patch could go though the media tree, > > assuming that folks are generally fine with the patch as such? > > Yes, it could. Thanks! I've applied this to my tree. -- Kind regards, Sakari Ailus