Re: [PATCH v4 1/4] device property: Add a function to test is a fwnode is a graph endpoint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <sakari.ailus@xxxxxx> 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 <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx>
> > > ---
> > >  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



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux