All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] of: Export __of_find_all_nodes()
@ 2017-01-18  9:38 Alexander Sverdlin
       [not found] ` <20170118093849.32204-1-alexander.sverdlin-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Sverdlin @ 2017-01-18  9:38 UTC (permalink / raw)
  Cc: Alexander Sverdlin, Rob Herring, Frank Rowand,
	devicetree-u79uwXL29TY76Z2rM5mHXA

This is necessary for for_each_of_allnodes() to work in the modules.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---
 drivers/of/base.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index 2eb4dea62b84..f576c33e0b84 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -270,6 +270,7 @@ struct device_node *__of_find_all_nodes(struct device_node *prev)
 	}
 	return np;
 }
+EXPORT_SYMBOL_GPL(__of_find_all_nodes);
 
 /**
  * of_find_all_nodes - Get next node in global list
-- 
2.11.0

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] of: Export __of_find_all_nodes()
       [not found] ` <20170118093849.32204-1-alexander.sverdlin-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
@ 2017-01-18 21:33   ` Frank Rowand
       [not found]     ` <587FDF1B.1060206-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Frank Rowand @ 2017-01-18 21:33 UTC (permalink / raw)
  To: Alexander Sverdlin; +Cc: Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA

On 01/18/17 01:38, Alexander Sverdlin wrote:
> This is necessary for for_each_of_allnodes() to work in the modules.
> 
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
> Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> ---
>  drivers/of/base.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index 2eb4dea62b84..f576c33e0b84 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -270,6 +270,7 @@ struct device_node *__of_find_all_nodes(struct device_node *prev)
>  	}
>  	return np;
>  }
> +EXPORT_SYMBOL_GPL(__of_find_all_nodes);
>  
>  /**
>   * of_find_all_nodes - Get next node in global list
> 

Quoting Rob from the last request for this:

"What driver needs this? This isn't really a function I'd expect drivers to use."

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] of: Export __of_find_all_nodes()
       [not found]     ` <587FDF1B.1060206-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-01-19  9:43       ` Alexander Sverdlin
       [not found]         ` <d9525715-be49-1cfa-f623-084237e44b4c-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Sverdlin @ 2017-01-19  9:43 UTC (permalink / raw)
  To: Frank Rowand; +Cc: Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA

Hi!

On 18/01/17 22:33, Frank Rowand wrote:
>> This is necessary for for_each_of_allnodes() to work in the modules.
>>
>> Signed-off-by: Alexander Sverdlin <alexander.sverdlin-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
>> Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
>> Cc: Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> ---
>>  drivers/of/base.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/of/base.c b/drivers/of/base.c
>> index 2eb4dea62b84..f576c33e0b84 100644
>> --- a/drivers/of/base.c
>> +++ b/drivers/of/base.c
>> @@ -270,6 +270,7 @@ struct device_node *__of_find_all_nodes(struct device_node *prev)
>>  	}
>>  	return np;
>>  }
>> +EXPORT_SYMBOL_GPL(__of_find_all_nodes);
>>  
>>  /**
>>   * of_find_all_nodes - Get next node in global list
>>
> Quoting Rob from the last request for this:
> 
> "What driver needs this? This isn't really a function I'd expect drivers to use."

This one and the one from previous patch/mail are used in a module which reads DT overlays
from pluggable extension boards, eventually performs some sanity checks/corrections and
applies these overlays. This eventual corrections require low-level access to DT.

I cannot judge, how relevant this usecase is for the community, but I was driven by the fact,
that the functions which require the functions I export are defined statically in .h files
and therefore are exposed to the modules.

-- 
Best regards,
Alexander Sverdlin.
--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] of: Export __of_find_all_nodes()
       [not found]         ` <d9525715-be49-1cfa-f623-084237e44b4c-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
@ 2017-01-19 22:42           ` Frank Rowand
       [not found]             ` <588140D4.1060103-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Frank Rowand @ 2017-01-19 22:42 UTC (permalink / raw)
  To: Alexander Sverdlin; +Cc: Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA

On 01/19/17 01:43, Alexander Sverdlin wrote:
> Hi!
> 
> On 18/01/17 22:33, Frank Rowand wrote:
>>> This is necessary for for_each_of_allnodes() to work in the modules.
>>>
>>> Signed-off-by: Alexander Sverdlin <alexander.sverdlin-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
>>> Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
>>> Cc: Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>>> ---
>>>  drivers/of/base.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/of/base.c b/drivers/of/base.c
>>> index 2eb4dea62b84..f576c33e0b84 100644
>>> --- a/drivers/of/base.c
>>> +++ b/drivers/of/base.c
>>> @@ -270,6 +270,7 @@ struct device_node *__of_find_all_nodes(struct device_node *prev)
>>>  	}
>>>  	return np;
>>>  }
>>> +EXPORT_SYMBOL_GPL(__of_find_all_nodes);
>>>  
>>>  /**
>>>   * of_find_all_nodes - Get next node in global list
>>>
>> Quoting Rob from the last request for this:
>>
>> "What driver needs this? This isn't really a function I'd expect drivers to use."
> 
> This one and the one from previous patch/mail are used in a module which reads DT overlays

If I understand correctly, that was a request to be able to use of_node_init() directly.
Is that correct?

> from pluggable extension boards, eventually performs some sanity checks/corrections and
> applies these overlays. This eventual corrections require low-level access to DT.

Are you saying that you want to modify the device tree data structure after the overlay
is applied?

The idea of sanity checks is one that I am very interested in.  Could the sanity checks
be done statically, either with the overlay source, or with the compiled overlay source?
The idea behind that question is whether the checks could be done while the overlay is
being developed, instead of at run time.

I am also curious about what sort of corrections are made and how it is determined what
corrections to make.


> I cannot judge, how relevant this usecase is for the community, but I was driven by the fact,
> that the functions which require the functions I export are defined statically in .h files
> and therefore are exposed to the modules.
> 

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] of: Export __of_find_all_nodes()
       [not found]             ` <588140D4.1060103-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-01-20  9:59               ` Alexander Sverdlin
  0 siblings, 0 replies; 5+ messages in thread
From: Alexander Sverdlin @ 2017-01-20  9:59 UTC (permalink / raw)
  To: Frank Rowand; +Cc: Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA

Hello Frank!

On 19/01/17 23:42, Frank Rowand wrote:
>>>> +EXPORT_SYMBOL_GPL(__of_find_all_nodes);
>>>>  
>>>>  /**
>>>>   * of_find_all_nodes - Get next node in global list
>>>>
>>> Quoting Rob from the last request for this:
>>>
>>> "What driver needs this? This isn't really a function I'd expect drivers to use."
>> This one and the one from previous patch/mail are used in a module which reads DT overlays
> If I understand correctly, that was a request to be able to use of_node_init() directly.
> Is that correct?

Correct. In case new node has to be added.

>> from pluggable extension boards, eventually performs some sanity checks/corrections and
>> applies these overlays. This eventual corrections require low-level access to DT.
> Are you saying that you want to modify the device tree data structure after the overlay
> is applied?
> 
> The idea of sanity checks is one that I am very interested in.  Could the sanity checks
> be done statically, either with the overlay source, or with the compiled overlay source?
> The idea behind that question is whether the checks could be done while the overlay is
> being developed, instead of at run time.
> 
> I am also curious about what sort of corrections are made and how it is determined what
> corrections to make.

In some cases these are just bugs, in other cases new DT bindings which change with Linux
version and in third either old overlay format, or even not overlay format.

But I see your point here. Actually it would be possible to convert all these cases to
overlay format and just apply an overlay. And all the API for this is already available.

Let us just abandon both export patches!

>> I cannot judge, how relevant this usecase is for the community, but I was driven by the fact,
>> that the functions which require the functions I export are defined statically in .h files
>> and therefore are exposed to the modules.
>>

-- 
Best regards,
Alexander Sverdlin.
--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-01-20  9:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-18  9:38 [PATCH] of: Export __of_find_all_nodes() Alexander Sverdlin
     [not found] ` <20170118093849.32204-1-alexander.sverdlin-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2017-01-18 21:33   ` Frank Rowand
     [not found]     ` <587FDF1B.1060206-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-19  9:43       ` Alexander Sverdlin
     [not found]         ` <d9525715-be49-1cfa-f623-084237e44b4c-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2017-01-19 22:42           ` Frank Rowand
     [not found]             ` <588140D4.1060103-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-20  9:59               ` Alexander Sverdlin

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.