[PATCH 0/1] of overlay callbacks

From: Alan Tull
Date: Wed Feb 17 2016 - 12:43:45 EST


[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