Messages in this thread | | | Date | Mon, 9 Nov 2020 17:41:08 +0000 | From | Mark Brown <> | Subject | Re: [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] | |