lkml.org 
[lkml]   [2020]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC] driver core: Ensure DT devices always have fwnode set
On Mon, Nov 09, 2020 at 11:25:39AM -0600, Rob Herring wrote:
> On Fri, Nov 6, 2020 at 1:09 PM Saravana Kannan <saravanak@google.com> wrote:

> > And all the subsystems that create their own device from an of_node
> > should use of_set_device_of_node() to set the device's of_node. That
> > way, all this is done in a consistent manner across subsystems and
> > avoid all of the of_get/put() and OF_POPULATED set/clear strewn all
> > over the subsystems.

> Perhaps a fwnode call in device_add instead that implements the above
> and anything else needed for each type of fwnode. It might even be
> possible with that to get rid of most of

I'd suggested doing it with a callout as well in the original thread
that sparked my proposal - my patch was just the most minimal
implementation to fix the current problem.

> of_platform_device_create_pdata() and of_device_add(). IIRC, those
> were pretty much copies of the core code.

> That would also be less fragile than having a coccinelle script.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-11-09 18:41    [W:0.064 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site