From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Benjamin Herrenschmidt
<benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
atull@atull-linux1,
Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
Subject: Re: adding OF_DYNAMIC proc interface
Date: Fri, 28 Sep 2012 15:54:13 -0600 [thread overview]
Message-ID: <50661C85.4000209@wwwdotorg.org> (raw)
In-Reply-To: <1348867740.7621.4.camel@pasglop>
On 09/28/2012 03:29 PM, Benjamin Herrenschmidt wrote:
> On Fri, 2012-09-28 at 11:46 -0500, Alan Tull wrote:
>> Hello,
>>
>> The following patch adds a /proc/ofdt interface to add or remove device tree
>> nodes dynamically.
>>
>> Based on earlier feedback, I've changed my driver to use /proc instead of
>> creating a new ioctl (the old thread is at
>> http://www.mail-archive.com/devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org/msg17333.html)
>>
>>
>> I was hoping to get some early feedback from others who might be interested
>> who were discussing this on an earlier thread about OF_DYNAMIC usage.
>>
>> This code doesn't do any notification for drivers yet. It can add multiple
>> nodes and they will show up properly under /proc/device-tree. It has an
>> issue that shows up when removing nodes (it appears that the memory used by
>> proc gets corrupted after the add).
>
> (Adding Arnd here)
>
> Have you guys considered whether a better approach would be a file
> system ? IE, create a node by creating a directory, add files for
> properties etc... ?
>
> It might need some trick to make the node "active" (in order to not
> internally in the kernel start exposing unfinished nodes), maybe a
> special file, maybe a permission trick ...
mkdir automatically creates status="disabled" or similar internally to
the kernel?
prev parent reply other threads:[~2012-09-28 21:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1348850798-24352-1-git-send-email-atull@altera.com>
[not found] ` <1348850798-24352-1-git-send-email-atull-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org>
2012-09-28 21:29 ` adding OF_DYNAMIC proc interface Benjamin Herrenschmidt
2012-09-28 21:54 ` Stephen Warren [this message]
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=50661C85.4000209@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=atull@atull-linux1 \
--cc=benh-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@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).