From: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Alan Tull <atull-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: dynamic device tree char driver
Date: Sat, 18 Aug 2012 10:45:45 -0500 [thread overview]
Message-ID: <502FB8A9.4030907@gmail.com> (raw)
In-Reply-To: <1345146226-32675-1-git-send-email-atull-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
On 08/16/2012 02:43 PM, Alan Tull wrote:
>
> Hello,
>
> I'm Alan Tull, interested in dynamic features of device trees.
Hey Alan. How are you doing?
> The following patch adds a char driver to add or remove device tree
> nodes dynamically. Its ioctl passes a struct with:
> - size of the blob
> - pointer to the blob
>
> The path to add the nodes under is coded in the blob with dummy nodes.
> For example the following can be compiled into a blob and sent to this
> driver adding a single node under /soc/apb_periphs:
>
> /dts-v1/;
> / {
> soc {
> apb_periphs {
> i2c1: i2c@ffc05000 {
> compatible = "snps,designware-i2c";
> reg = <0xffc05000 0x1000>;
> interrupts = <0 159 4>;
> emptyfifo_hold_master = <1>;
> };
> };
> };
> };
>
> I wanted to get feeback early before I went too far down this particular
> path. As such, this code doesn't do any notification for drivers yet.
> Also it won't properly add nested nodes yet. It can add/remove a single
> node and see it show up properly under /proc/device-tree.
Have you looked at arch/powerpc/platforms/pseries/reconfig.c?
There was also a recent discussion titled "OF_DYNAMIC usage" that you
should look at.
I don't think a char driver and ioctls will fly...
Another option could be kexecing with a new DTB if you can live with a
reboot.
Rob
>
> Alan Tull
> Altera
>
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss
>
next prev parent reply other threads:[~2012-08-18 15:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-16 19:43 dynamic device tree char driver Alan Tull
[not found] ` <1345146226-32675-1-git-send-email-atull-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
2012-08-16 19:43 ` [PATCH 1/1] " Alan Tull
2012-08-18 15:45 ` Rob Herring [this message]
[not found] ` <502FB8A9.4030907-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-08-21 14:38 ` Alan Tull
2012-08-21 16:51 ` Rob Herring
[not found] ` <5033BCAE.6080902-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-08-21 18:55 ` Alan Tull
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=502FB8A9.4030907@gmail.com \
--to=robherring2-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=atull-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.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;
as well as URLs for NNTP newsgroup(s).