lkml.org 
[lkml]   [2016]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH] of overlay callbacks
Date
Adding functionality for registering callbacks with the
of overlay code.

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.

This is useful for me as I can apply an FPGA overlay that
contains the file name that I want to program the FPGA with
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.

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

\
 
 \ /
  Last update: 2016-02-16 20:21    [W:0.041 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site