On Mon, 22 Feb 2016, Rob Herring wrote: > On Wed, Feb 17, 2016 at 11:41:25AM -0600, Alan Tull wrote: > > Add overlay callback functionality. > > > > When DT overlays are being added, some drivers/subsystems > > will want to know about the changes before they go into the > > live tree. Similarly there is a need for post-remove > > callbacks. > > > > Each handler is registered with a of_device_id. When > > an overlay target matches a handler's id, the handler > > gets called. > > > > The following 4 cases are handled: pre-apply, post-apply, > > pre-remove, and post-remove. > > So I know I suggested maybe not using notifiers, but this ends up just > looking like notifiers, so we might as well use them unless we somehow > change the flow. You would just need to add pre-apply and pre-remove > in of_attach_node and of_detach_node, right? Just sent out a patch. Nobody calls of_attach_node or of_detach_node so I had to add the notifiers elsewhere. For overlays, I wanted to add a pointer to the overlay fragment since pre-apply notifiers won't otherwise have that information (unlike post-apply or pre-remove notifiers where the overlay has already made it into the live tree). That complicated the implementation a bit further. Alan > > Rob > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html