[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <FE390E17-5AFB-41AE-9EB3-7EBA3B5D92FF@antoniou-consulting.com>
Date: Wed, 6 Nov 2013 11:57:50 +0200
From: Pantelis Antoniou <panto@...oniou-consulting.com>
To: Ionut Nicu <ioan.nicu.ext@....com>
Cc: Grant Likely <grant.likely@...retlab.ca>,
Rob Herring <robherring2@...il.com>,
Stephen Warren <swarren@...dotorg.org>,
Matt Porter <matt.porter@...aro.org>,
Koen Kooi <koen@...inion.thruhere.net>,
Alison Chaiken <Alison_Chaiken@...tor.com>,
Dinh Nguyen <dinh.linux@...il.com>,
Jan Lubbe <jluebbe@...net.de>,
Alexander Sverdlin <alexander.sverdlin@....com>,
Michael Stickel <ms@...able.de>,
Guenter Roeck <linux@...ck-us.net>,
Dirk Behme <dirk.behme@...il.com>,
Alan Tull <delicious.quinoa@...il.com>,
Sascha Hauer <s.hauer@...gutronix.de>,
Michael Bohan <mbohan@...eaurora.org>,
Michal Simek <monstr@...str.eu>,
Matt Ranostay <mranostay@...il.com>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] DT: proc: Add runtime overlay interface in /proc
Hi Ionut,
On Nov 6, 2013, at 11:51 AM, Ionut Nicu wrote:
> Hi,
>
> On 05.11.2013 19:41, ext Pantelis Antoniou wrote:
>> Add a runtime interface to /proc to enable generic device tree overlay
>> usage.
>>
>> Two new /proc files are added:
>>
>> /proc/device-tree-overlay & /proc/device-tree-overlay-status
>>
>> /proc/device-tree-overlay accepts a stream of a device tree objects and
>> applies it to the running kernel's device tree.
>>
>> $ cat ~/BB-UART2-00A0.dtbo >device-tree-overlay
>> overlay_proc_release: Applied #2 overlay segments @0
>>
>> /proc/device-tree-overlay-status displays the the overlays added using
>> the /proc interface
>>
>> $ cat device-tree-overlay-status
>> 0: 861 bytes BB-UART2:00A0
>>
>> The format of the status line is
>> <ID>: <SIZE> bytes <part-number>:<version>
>>
>> <ID> is the id of the overlay
>> <SIZE> is the size of the overlay in bytes
>> <part-number>, <version> are (optional) root level properties of the DTBO
>>
>> You can remove an overlay by echoing the <ID> number of the overlay
>> precedded with a '-'
>>
>> So
>> $ echo "-0" >device-tree-overlay-status
>>
>
> Wouldn't it be easier if echo "-BB-UART2-00A0" > device-tree-overlay-status was
> supported also? That way one doesn't need to know the order in which the
> overlays were applied or parse the status file to get the <ID>.
>
Unfortunately no since this is a raw bytestream interface; there is no file
information. The patchset does display any root level part-number & version properties
but that's completely options.
We could standardize in a named root property to use on each overlay, and the part-number &
version are as good as any.
>> Removes the overlay.
>>
>> Note that this seldom works on most platforms since platform_device
>> removal is something that almost never works without extra patches.
>>
>> Signed-off-by: Pantelis Antoniou <panto@...oniou-consulting.com>
>
> It would be very helpful to me if I would have a notification mechanism
> for overlay add and remove operations based on blocking_notifier_call_chain(),.
> This way other drivers can be notified when the dt changes.
>
Yes. Some people expressed interest in something similar.
> But I guess that could be added in the future with another patch.
>
Yep.
> Thanks,
> Ionut
Let's get the basic support in now, and we can fix all of that on later patches.
Regards
-- Pantelis
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists