[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0ivF_HopaUXJVBkTJj3XLVk-7NPcW5JE-OmyrsQG+O2NA@mail.gmail.com>
Date: Fri, 21 Sep 2018 11:17:05 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: svellattu@...sta.com
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Driver core: add bus_find_device_by_of_node
On Fri, Sep 21, 2018 at 5:45 AM Silesh C V <svellattu@...sta.com> wrote:
>
> Hello Rafael,
>
> On Thu, Sep 20, 2018 at 1:06 PM Rafael J. Wysocki <rafael@...nel.org> wrote:
> >
> > On Thu, Sep 20, 2018 at 7:43 AM Silesh C V <svellattu@...sta.com> wrote:
> > >
> > > Similar to bus_find_device_by_name, but finds the device having a
> > > specific of_node.
> >
> > First, what do you need it for? Please describe your use case in the changelog.
>
> This will be useful for drivers that do not register a platform_driver
> (but retrieve the "simple-bus" device_node using
> of_find_compatible_node etc.) but are still interested in the struct
> device.
>
> >
> > Second, what about a more generic bus_find_device_by_fwnode() ?
>
> If you think that the above requirement warrants the inclusion of
> bus_find_device_by_of_node, I can try implementing this in v2.
I'm not really sure what you mean, but if there is
bus_find_device_by_fwnode(), it will be useful not just for DT code,
but generally, and getting an of_node from fwnode is trivial.
Thanks,
Rafael
Powered by blists - more mailing lists