[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1602221531170.3928@atull-730U3E-740U3E>
Date: Mon, 22 Feb 2016 15:40:18 -0600
From: atull <atull@...nsource.altera.com>
To: Pantelis Antoniou <pantelis.antoniou@...sulko.com>
CC: Rob Herring <robh@...nel.org>,
Frank Rowand <frowand.list@...il.com>,
Grant Likely <grant.likely@...aro.org>,
Devicetree List <devicetree@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Moritz Fischer <moritz.fischer@...us.com>,
Alan Tull <delicious.quinoa@...il.com>,
Dinh Nguyen <dinguyen@...nsource.altera.com>
Subject: Re: [PATCH 1/1] of/overlay: of overlay callbacks
On Mon, 22 Feb 2016, Pantelis Antoniou wrote:
> Hi Rob,
>
> > On Feb 22, 2016, at 04:55 , Rob Herring <robh@...nel.org> 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?
> >
>
>
> I agree those look just like notifiers. We could just update the notifier
> logic to handle this case.
>
> Am I missing something else?
>
We also need the device node of the overlay itself included in
of_reconfig_data. Otherwise notification of each addded property goes
out with little context. For instance, when my FPGA code gets pre-add
notification that a "firmware-name" property has been added to an
existing "fpga-region" node, the fpga-region also needs to know what
other properties are about to be added. Having the overlay would take
care of that easily.
I'm working on it and may have something tomorrow.
Alan
>
> > Rob
>
> Regards
>
> — Pantelis
>
>
Powered by blists - more mailing lists