[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqKLLOPfy8Psxgq7uOuy09+vj4K2jnoU+iZspfgou5ui4g@mail.gmail.com>
Date: Tue, 19 Apr 2016 16:13:58 -0500
From: Rob Herring <robh+dt@...nel.org>
To: Alan Tull <atull@...nsource.altera.com>
Cc: Pantelis Antoniou <pantelis.antoniou@...sulko.com>,
Frank Rowand <frowand.list@...il.com>,
Grant Likely <grant.likely@...aro.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Moritz Fischer <moritz.fischer@...us.com>,
Pantelis Antoniou <pantelis.antoniou@...il.com>,
Alan Tull <delicious.quinoa@...il.com>,
Dinh Nguyen <dinguyen@...nsource.altera.com>
Subject: Re: [PATCH v3] of/overlay: add of overlay notifications
On Thu, Mar 3, 2016 at 9:10 AM, Alan Tull <atull@...nsource.altera.com> wrote:
> This patch add of overlay notifications.
>
> When DT overlays are being added, some drivers/subsystems
> need to see device tree overlays before the changes go into
> the live tree.
>
> This is distinct from reconfig notifiers that are
> post-apply or post-remove and which issue very granular
> notifications without providing access to the context
> of a whole overlay.
>
> The following 4 notificatons are issued:
> OF_OVERLAY_PRE_APPLY
> OF_OVERLAY_POST_APPLY
> OF_OVERLAY_PRE_REMOVE
> OF_OVERLAY_POST_REMOVE
>
> In the case of pre-apply notification, if the notifier
> returns error, the overlay will be rejected.
>
> This patch exports two functions for registering/unregistering
> notifications:
> of_overlay_notifier_register(struct notifier_block *nb)
> of_overlay_notifier_unregister(struct notifier_block *nb)
>
> The of_mutex is held during these notifications. The
> notification data includes pointers to the overlay target
> and the overlay:
>
> struct of_overlay_notify_data {
> struct device_node *overlay;
> struct device_node *target;
> };
>
> Signed-off-by: Alan Tull <atull@...nsource.altera.com>
> ---
> v2: add missing 'static inline' in of.h
> v3: fix build for !OF_OVERLAY in of.h
> add a note in the header that the of_mutex is held
> ---
> drivers/of/overlay.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
> include/linux/of.h | 25 +++++++++++++++++++++++++
> 2 files changed, 71 insertions(+), 1 deletion(-)
This looks fine to me, but apply it when you have a user.
Acked-by: Rob Herring <robh@...nel.org>
Rob
Powered by blists - more mailing lists