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=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 8D83EC433E3 for ; Wed, 1 Jul 2020 12:19:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6E2FD20772 for ; Wed, 1 Jul 2020 12:19:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593605975; bh=EiD1umHZeVlg+fpfO3hj8zUGGobLGLzCceLNFwVxI3s=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=w2r571E5yBf26s0HA2oS+SScJJgd5+htK+5Ctl0O2OEuD0Nn2KLxfl5BCZuXRT+uj nY2zLDSyHJmH8l6mSUcteQBJlQltFyUU8tZQk5jV4bP4vjGx0V3F2/3/1uRwejt55t BIgGIHpKjByAgIY/Fl7yTASitz7FScbkn+JwNkDE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730521AbgGAMTe (ORCPT ); Wed, 1 Jul 2020 08:19:34 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:37974 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730161AbgGAMTe (ORCPT ); Wed, 1 Jul 2020 08:19:34 -0400 Received: by mail-oi1-f193.google.com with SMTP id r8so20400313oij.5; Wed, 01 Jul 2020 05:19:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0lKvcHCLUJbtgdK0hdZoGgT86fGFZZmtsMyR7+SlSG8=; b=SivwNhHrv051c1WrI7MmTPYmCFRbL72Ma7NFNH0PWWCsEYqO8j7OSW2DxNxPJURiA9 0SPlTRdzonTBeyo9rrEkR/EZpszEX3MeTUHXxB/96S6BCRp305ofQoEfXPxTiPq00SkT hkXi4apvHmOAclxAJCRGDsBia2q6jrxnMKTvW66fJfjZX7Ga0FZRH7JKcAMhURe6M6fK fo7MI353ZQ98WZ7Wj5+3ZiHrkm7MJIvS0SwwDD30L0hda3O3o7HxAM+EI5F3A+R00Wgl TlDQZXED/klnnE/01aHhIW4ERsrBTEyYFvHhJYTVj9LlJ3el8EZ8ki4yXn1kg5ug31B+ m8pg== X-Gm-Message-State: AOAM531HWV7sgzYASrw6ValD39opv2PxafgI+ulpbC56wWvHHqgdLCR2 WE9bhj34dkkYsYbZsQtPw0HIDGkVg/N5/Ke3qhY= X-Google-Smtp-Source: ABdhPJzLCE9xDXtcTvnQkYUY3+XR2ef/vN6UYnES49W6m7DDHnWOZ49LApIokEJcUPpwfIuEYqxZbZ1YV2pb+qGUQ3g= X-Received: by 2002:aca:4a89:: with SMTP id x131mr20767181oia.103.1593605973188; Wed, 01 Jul 2020 05:19:33 -0700 (PDT) MIME-Version: 1.0 References: <20200701062140.12953-1-laurent.pinchart+renesas@ideasonboard.com> <20200701062140.12953-2-laurent.pinchart+renesas@ideasonboard.com> <20200701073405.GB836@valkosipuli.retiisi.org.uk> In-Reply-To: <20200701073405.GB836@valkosipuli.retiisi.org.uk> From: "Rafael J. Wysocki" Date: Wed, 1 Jul 2020 14:19:21 +0200 Message-ID: Subject: Re: [PATCH v4 1/4] device property: Add a function to test is a fwnode is a graph endpoint To: Sakari Ailus Cc: Laurent Pinchart , linux-media@vger.kernel.org, Linux-Renesas , Jacopo Mondi , =?UTF-8?Q?Niklas_S=C3=B6derlund?= , Kieran Bingham , Lad Prabhakar , "Rafael J. Wysocki" , "devicetree@vger.kernel.org" , ACPI Devel Maling List Content-Type: text/plain; charset="UTF-8" Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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.