From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Tull Subject: [PATCH 0/1] of overlay callbacks Date: Wed, 17 Feb 2016 11:41:24 -0600 Message-ID: <1455730885-1514-1-git-send-email-atull@opensource.altera.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Pantelis Antoniou , Rob Herring Cc: Frank Rowand , Grant Likely , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Moritz Fischer , Pantelis Antoniou , Alan Tull , Dinh Nguyen , Alan Tull List-Id: devicetree@vger.kernel.org [Resend as patch/cover letter got separated yesterday] Adding functionality for registering callbacks with the of overlay code. This will be useful for drivers responding to overlays and will allow their implementations to not use reconfig notifiers. Also the reconfig notifiers are too late as they go out after the overlay has been added to the live tree. My use of the overlay callback is to control FPGA programming from a DT overlay. The overlay would contain the FPGA image file name and the child device information. My FPGA code gets the pre-apply callback and attempts to program the FPGA. If the programming failed, the callback can return an error and prevent the overlay from being applied. If FPGA programming succeeds, the overlay will continue and be added to the live tree. The child devices in the overlay will get populated and probed. I've tested this with code that uses pre-apply and post-remove handlers. Tested on next-20160216 and Pantelis' current bbb-overlays branch. Alan Tull (1): of/overlay: of overlay callbacks drivers/of/overlay.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++++- include/linux/of.h | 31 +++++++++++++++++ 2 files changed, 120 insertions(+), 1 deletion(-) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html