mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Tull <atull@opensource.altera.com>
To: Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
	Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>,
	Grant Likely <grant.likely@linaro.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Moritz Fischer <moritz.fischer@ettus.com>,
	Pantelis Antoniou <pantelis.antoniou@gmail.com>,
	Alan Tull <delicious.quinoa@gmail.com>,
	Dinh Nguyen <dinguyen@opensource.altera.com>,
	Alan Tull <atull@opensource.altera.com>
Subject: [PATCH 0/1] of overlay callbacks
Date: Wed, 17 Feb 2016 11:41:24 -0600	[thread overview]
Message-ID: <1455730885-1514-1-git-send-email-atull@opensource.altera.com> (raw)

[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

             reply	other threads:[~2016-02-17 17:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-17 17:41 Alan Tull [this message]
2016-02-17 17:41 ` [PATCH 1/1] of/overlay: " Alan Tull
2016-02-18  5:13   ` Moritz Fischer
2016-02-18 15:10     ` atull
2016-02-22  2:55   ` Rob Herring
2016-02-22 15:38     ` Pantelis Antoniou
2016-02-22 21:40       ` atull
2016-02-24 22:36     ` atull

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455730885-1514-1-git-send-email-atull@opensource.altera.com \
    --to=atull@opensource.altera.com \
    --cc=delicious.quinoa@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@opensource.altera.com \
    --cc=frowand.list@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=moritz.fischer@ettus.com \
    --cc=pantelis.antoniou@gmail.com \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome