lkml.org 
[lkml]   [2015]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 1/9] drivers/of: Introduce of_node_alloc
On 9/28/2015 9:42 AM, Marc Zyngier wrote:
> We want to be able to generate "fake" device nodes that can be
> used as an identifier for irq domains. For that, we reuse the
> dynamic DT layer in order to generate DT nodes in a detached state
> (so that it doesn't interfere with the rest of the tree).
>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> ---
> drivers/of/dynamic.c | 22 ++++++++++++++++++++++
> include/linux/of.h | 5 +++++
> 2 files changed, 27 insertions(+)
>
> diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c
> index 53826b8..709d363 100644
> --- a/drivers/of/dynamic.c
> +++ b/drivers/of/dynamic.c
> @@ -445,6 +445,28 @@ struct device_node *__of_node_dup(const struct device_node *np, const char *fmt,
> return NULL;
> }
>
> +/**
> + * of_node_alloc() - Allocate an empty device node dynamically.
> + * @fmt: Format string (plus vargs) for new full name of the device node
> + *
> + * Create an device tree node, either by by allocating an empty one

Create a device tree node by allocating an empty one

> + * suitable for further modification. The node data are dynamically
> + * allocated and all the node flags have the OF_DYNAMIC & OF_DETACHED
> + * bits set. Returns the newly allocated node or NULL on out of memory
> + * error.
> + */
> +struct device_node *of_node_alloc(const char *fmt, ...)

< snip >



\
 
 \ /
  Last update: 2015-09-29 01:01    [W:0.090 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site