All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ionut Nicu <ioan.nicu.ext-OYasijW0DpE@public.gmane.org>
To: ext Pantelis Antoniou
	<panto-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org>
Cc: Grant Likely
	<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
	Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	Matt Porter <matt.porter-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Koen Kooi
	<koen-QLwJDigV5abLmq1fohREcCpxlwaOVQ5f@public.gmane.org>,
	Alison Chaiken
	<Alison_Chaiken-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>,
	Dinh Nguyen <dinh.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Jan Lubbe <jluebbe-H4yykcOXDpCzQB+pC5nmwQ@public.gmane.org>,
	Alexander Sverdlin
	<alexander.sverdlin-OYasijW0DpE@public.gmane.org>,
	Michael Stickel <ms-g5CePrrZ5ROELgA04lAiVw@public.gmane.org>,
	Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>,
	Dirk Behme <dirk.behme-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Alan Tull
	<delicious.quinoa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Michael Bohan <mbohan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Michal Simek <monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org>,
	Matt Ranostay <mranostay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 3/3] DT: proc: Add runtime overlay interface in /proc
Date: Wed, 06 Nov 2013 10:51:43 +0100	[thread overview]
Message-ID: <527A112F.6070908@nsn.com> (raw)
In-Reply-To: <1383676898-29819-4-git-send-email-panto-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org>

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>.

> 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-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org>

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.

But I guess that could be added in the future with another patch.

Thanks,
Ionut
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Ionut Nicu <ioan.nicu.ext@nsn.com>
To: ext Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Grant Likely <grant.likely@secretlab.ca>,
	Rob Herring <robherring2@gmail.com>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Matt Porter <matt.porter@linaro.org>,
	Koen Kooi <koen@dominion.thruhere.net>,
	Alison Chaiken <Alison_Chaiken@mentor.com>,
	Dinh Nguyen <dinh.linux@gmail.com>, Jan Lubbe <jluebbe@lasnet.de>,
	Alexander Sverdlin <alexander.sverdlin@nsn.com>,
	Michael Stickel <ms@mycable.de>,
	Guenter Roeck <linux@roeck-us.net>,
	Dirk Behme <dirk.behme@gmail.com>,
	Alan Tull <delicious.quinoa@gmail.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Michael Bohan <mbohan@codeaurora.org>,
	Michal Simek <monstr@monstr.eu>,
	Matt Ranostay <mranostay@gmail.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] DT: proc: Add runtime overlay interface in /proc
Date: Wed, 06 Nov 2013 10:51:43 +0100	[thread overview]
Message-ID: <527A112F.6070908@nsn.com> (raw)
In-Reply-To: <1383676898-29819-4-git-send-email-panto@antoniou-consulting.com>

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>.

> 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@antoniou-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.

But I guess that could be added in the future with another patch.

Thanks,
Ionut

  parent reply	other threads:[~2013-11-06  9:51 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-05 18:41 [PATCH 0/3 - V2] Introducing Device Tree Overlays Pantelis Antoniou
2013-11-05 18:41 ` Pantelis Antoniou
2013-11-05 18:41 ` [PATCH 1/3] OF: Introduce Device Tree resolve support Pantelis Antoniou
     [not found]   ` <1383676898-29819-2-git-send-email-panto-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org>
2013-11-06 15:59     ` Alexander Sverdlin
2013-11-06 15:59       ` Alexander Sverdlin
     [not found]       ` <527A6777.9080401-OYasijW0DpE@public.gmane.org>
2013-11-06 16:24         ` Ionut Nicu
2013-11-06 16:24           ` Ionut Nicu
2013-11-05 18:41 ` [PATCH 2/3] OF: Introduce DT overlay support Pantelis Antoniou
     [not found]   ` <1383676898-29819-3-git-send-email-panto-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org>
2013-11-06 16:00     ` Alexander Sverdlin
2013-11-06 16:00       ` Alexander Sverdlin
     [not found]       ` <527A67B7.8040808-OYasijW0DpE@public.gmane.org>
2013-11-06 16:26         ` Ionut Nicu
2013-11-06 16:26           ` Ionut Nicu
2013-11-06 20:41     ` Dinh Nguyen
2013-11-06 20:41       ` Dinh Nguyen
     [not found]       ` <527AA97F.2050802-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-11-07  7:10         ` Pantelis Antoniou
2013-11-07  7:10           ` Pantelis Antoniou
2013-11-05 18:41 ` [PATCH 3/3] DT: proc: Add runtime overlay interface in /proc Pantelis Antoniou
2013-11-06 19:10   ` Rob Herring
     [not found]     ` <CAL_Jsq+k9NoHxOaNujTG2=0MHm=s4Mh+xhXCZbhPG1EnHvo50A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-06 19:24       ` Pantelis Antoniou
2013-11-06 19:24         ` Pantelis Antoniou
     [not found]         ` <8EBC2D5B-74A4-4A85-8BEE-9EAEBFF045D4-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org>
2013-11-06 20:16           ` Matt Porter
2013-11-06 20:16             ` Matt Porter
2013-11-07  7:44             ` Pantelis Antoniou
2013-11-07  7:44               ` Pantelis Antoniou
     [not found]   ` <1383676898-29819-4-git-send-email-panto-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org>
2013-11-06  9:51     ` Ionut Nicu [this message]
2013-11-06  9:51       ` Ionut Nicu
2013-11-06  9:57       ` Pantelis Antoniou
2013-11-07 23:38     ` delicious quinoa
2013-11-07 23:38       ` delicious quinoa
2013-11-08  7:12       ` Pantelis Antoniou
     [not found] ` <1383676898-29819-1-git-send-email-panto-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org>
2013-11-05 19:06   ` [PATCH 0/3 - V2] Introducing Device Tree Overlays Guenter Roeck
2013-11-05 19:06     ` Guenter Roeck
2013-11-06  0:01     ` Dinh Nguyen
     [not found]     ` <20131105190633.GA21178-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-11-06  0:15       ` Dinh Nguyen
2013-11-06  0:15         ` Dinh Nguyen
2013-11-06 19:01   ` Sebastian Andrzej Siewior
2013-11-06 19:01     ` Sebastian Andrzej Siewior
2013-11-06 19:08     ` Pantelis Antoniou
     [not found]       ` <C10E33D7-53F6-4A50-9B84-1149DDBDC46F-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org>
2013-11-06 20:31         ` Sebastian Andrzej Siewior
2013-11-06 20:31           ` Sebastian Andrzej Siewior
2013-11-06 20:41           ` Sebastian Andrzej Siewior
     [not found]             ` <20131106204143.GD8662-E0PNVn5OA6ohrxcnuTQ+TQ@public.gmane.org>
2013-11-07  7:24               ` Pantelis Antoniou
2013-11-07  7:24                 ` Pantelis Antoniou
     [not found]           ` <20131106203102.GB8662-E0PNVn5OA6ohrxcnuTQ+TQ@public.gmane.org>
2013-11-07  7:23             ` Pantelis Antoniou
2013-11-07  7:23               ` Pantelis Antoniou
2013-11-07  9:45         ` Alexander Sverdlin
2013-11-07  9:45           ` Alexander Sverdlin
2013-11-06 19:30     ` Guenter Roeck
     [not found]       ` <20131106193041.GA26796-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-11-06 20:38         ` Sebastian Andrzej Siewior
2013-11-06 20:38           ` Sebastian Andrzej Siewior
2013-11-06 21:17           ` Guenter Roeck
     [not found]             ` <20131106211754.GA29300-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2013-11-07  7:27               ` Pantelis Antoniou
2013-11-07  7:27                 ` Pantelis Antoniou
2013-11-07 19:25               ` Sebastian Andrzej Siewior
2013-11-07 19:25                 ` Sebastian Andrzej Siewior
     [not found]                 ` <20131107192558.GA11453-E0PNVn5OA6ohrxcnuTQ+TQ@public.gmane.org>
2013-11-07 20:06                   ` Pantelis Antoniou
2013-11-07 20:06                     ` Pantelis Antoniou
     [not found]                     ` <4F47D5F8-F3C7-45CA-9D88-2D814BDC1BC7-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org>
2013-11-07 20:46                       ` Sebastian Andrzej Siewior
2013-11-07 20:46                         ` Sebastian Andrzej Siewior
     [not found]                         ` <20131107204626.GA11746-E0PNVn5OA6ohrxcnuTQ+TQ@public.gmane.org>
2013-11-07 23:00                           ` Guenter Roeck
2013-11-07 23:00                             ` Guenter Roeck
2013-11-08  7:12                             ` Pantelis Antoniou
2013-11-08  8:40                             ` Sebastian Andrzej Siewior
2013-11-08  7:09                           ` Pantelis Antoniou
2013-11-08  7:09                             ` Pantelis Antoniou
2013-11-11 17:04                           ` Grant Likely
2013-11-11 17:04                             ` Grant Likely
     [not found]                             ` <20131111170453.4D999C42336-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2013-11-12  8:16                               ` Pantelis Antoniou
2013-11-12  8:16                                 ` Pantelis Antoniou
2013-11-07 22:51                       ` Guenter Roeck
2013-11-07 22:51                         ` Guenter Roeck
2013-11-07 22:22                   ` Guenter Roeck
2013-11-07 22:22                     ` Guenter Roeck
2013-11-06  8:53 ` Alexander Sverdlin

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=527A112F.6070908@nsn.com \
    --to=ioan.nicu.ext-oyasijw0dpe@public.gmane.org \
    --cc=Alison_Chaiken-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org \
    --cc=alexander.sverdlin-OYasijW0DpE@public.gmane.org \
    --cc=delicious.quinoa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dinh.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=dirk.behme-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=jluebbe-H4yykcOXDpCzQB+pC5nmwQ@public.gmane.org \
    --cc=koen-QLwJDigV5abLmq1fohREcCpxlwaOVQ5f@public.gmane.org \
    --cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matt.porter-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=mbohan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=monstr-pSz03upnqPeHXe+LvDLADg@public.gmane.org \
    --cc=mranostay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=ms-g5CePrrZ5ROELgA04lAiVw@public.gmane.org \
    --cc=panto-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org \
    --cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.