mbox series

[0/2] of: dynamic: restrict overlay by targets

Message ID 20171204191357.3211-1-atull@kernel.org
Headers show
Series of: dynamic: restrict overlay by targets | expand

Message

Alan Tull Dec. 4, 2017, 7:13 p.m. UTC
Restrict which nodes are valid targets for a DT overlay.

Add a flag bit to struct device_node allowing nodes to be marked as
valid target for overlays.

A driver that is always intended to handle DT overlays can
enable overlays by calling a function for its DT node.

For individual nodes that need to be opened up for a specific use,
adding the property "overlay-allowed" enables overlays targeting
that node.  I'll need to document the DT property, not sure where
specifically.  New file bindings/overlay.txt?

This patchset differs from the RFC:
* Added a flag bit and got rid of the whitelist
* Renamed the functions that enable a node
* Added a DT property

Alan Tull (2):
  of: overlay: add flag enabling overlays and enable fpga-region
    overlays
  of: dynamic: add overlay-allowed DT property

 drivers/fpga/of-fpga-region.c |  4 ++++
 drivers/of/base.c             |  4 ++--
 drivers/of/dynamic.c          |  3 +++
 drivers/of/fdt.c              |  3 +++
 drivers/of/of_private.h       |  2 ++
 drivers/of/overlay.c          | 26 ++++++++++++++++++++++++++
 include/linux/of.h            | 19 +++++++++++++++++++
 7 files changed, 59 insertions(+), 2 deletions(-)

Comments

Moritz Fischer Dec. 4, 2017, 7:18 p.m. UTC | #1
On Mon, Dec 04, 2017 at 01:13:55PM -0600, Alan Tull wrote:
> Restrict which nodes are valid targets for a DT overlay.
> 
> Add a flag bit to struct device_node allowing nodes to be marked as
> valid target for overlays.
> 
> A driver that is always intended to handle DT overlays can
> enable overlays by calling a function for its DT node.
> 
> For individual nodes that need to be opened up for a specific use,
> adding the property "overlay-allowed" enables overlays targeting
> that node.  I'll need to document the DT property, not sure where
> specifically.  New file bindings/overlay.txt?
> 
> This patchset differs from the RFC:
> * Added a flag bit and got rid of the whitelist
> * Renamed the functions that enable a node
> * Added a DT property
> 
> Alan Tull (2):
>   of: overlay: add flag enabling overlays and enable fpga-region
>     overlays
>   of: dynamic: add overlay-allowed DT property

I think [1/2] and [2/2] are backwards order. If applied like this,
it won't work. [1/2] uses stuff that gets added in [2/2]

> 
>  drivers/fpga/of-fpga-region.c |  4 ++++
>  drivers/of/base.c             |  4 ++--
>  drivers/of/dynamic.c          |  3 +++
>  drivers/of/fdt.c              |  3 +++
>  drivers/of/of_private.h       |  2 ++
>  drivers/of/overlay.c          | 26 ++++++++++++++++++++++++++
>  include/linux/of.h            | 19 +++++++++++++++++++
>  7 files changed, 59 insertions(+), 2 deletions(-)
> 
> -- 
> 2.7.4
> 

Moritz
Moritz Fischer Dec. 4, 2017, 7:20 p.m. UTC | #2
On Mon, Dec 04, 2017 at 11:18:49AM -0800, Moritz Fischer wrote:
> On Mon, Dec 04, 2017 at 01:13:55PM -0600, Alan Tull wrote:
> > Restrict which nodes are valid targets for a DT overlay.
> > 
> > Add a flag bit to struct device_node allowing nodes to be marked as
> > valid target for overlays.
> > 
> > A driver that is always intended to handle DT overlays can
> > enable overlays by calling a function for its DT node.
> > 
> > For individual nodes that need to be opened up for a specific use,
> > adding the property "overlay-allowed" enables overlays targeting
> > that node.  I'll need to document the DT property, not sure where
> > specifically.  New file bindings/overlay.txt?
> > 
> > This patchset differs from the RFC:
> > * Added a flag bit and got rid of the whitelist
> > * Renamed the functions that enable a node
> > * Added a DT property
> > 
> > Alan Tull (2):
> >   of: overlay: add flag enabling overlays and enable fpga-region
> >     overlays
> >   of: dynamic: add overlay-allowed DT property
> 
> I think [1/2] and [2/2] are backwards order. If applied like this,
> it won't work. [1/2] uses stuff that gets added in [2/2]

Ignore that, my mailclient is being funny.

Moritz
> 
> > 
> >  drivers/fpga/of-fpga-region.c |  4 ++++
> >  drivers/of/base.c             |  4 ++--
> >  drivers/of/dynamic.c          |  3 +++
> >  drivers/of/fdt.c              |  3 +++
> >  drivers/of/of_private.h       |  2 ++
> >  drivers/of/overlay.c          | 26 ++++++++++++++++++++++++++
> >  include/linux/of.h            | 19 +++++++++++++++++++
> >  7 files changed, 59 insertions(+), 2 deletions(-)
> > 
> > -- 
> > 2.7.4
> > 
> 
> Moritz


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Frank Rowand Dec. 5, 2017, 1:14 a.m. UTC | #3
Hi Alan,

In the RFC thread "of: Add whitelist", I did not understand the use case and
asked you some questions (30 Nov 2017 07:46:36 -0500), that you seem to have
overlooked (or my mail server failed to deliver your answer to me).  Can you
please answer that question so I can better understand this patch set is
needed for.

Thanks,

Frank


On 12/04/17 14:13, Alan Tull wrote:
> Restrict which nodes are valid targets for a DT overlay.
> 
> Add a flag bit to struct device_node allowing nodes to be marked as
> valid target for overlays.
> 
> A driver that is always intended to handle DT overlays can
> enable overlays by calling a function for its DT node.
> 
> For individual nodes that need to be opened up for a specific use,
> adding the property "overlay-allowed" enables overlays targeting
> that node.  I'll need to document the DT property, not sure where
> specifically.  New file bindings/overlay.txt?
> 
> This patchset differs from the RFC:
> * Added a flag bit and got rid of the whitelist
> * Renamed the functions that enable a node
> * Added a DT property
> 
> Alan Tull (2):
>   of: overlay: add flag enabling overlays and enable fpga-region
>     overlays
>   of: dynamic: add overlay-allowed DT property
> 
>  drivers/fpga/of-fpga-region.c |  4 ++++
>  drivers/of/base.c             |  4 ++--
>  drivers/of/dynamic.c          |  3 +++
>  drivers/of/fdt.c              |  3 +++
>  drivers/of/of_private.h       |  2 ++
>  drivers/of/overlay.c          | 26 ++++++++++++++++++++++++++
>  include/linux/of.h            | 19 +++++++++++++++++++
>  7 files changed, 59 insertions(+), 2 deletions(-)
> 

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alan Tull Dec. 5, 2017, 5:07 p.m. UTC | #4
On Mon, Dec 4, 2017 at 7:14 PM, Frank Rowand <frowand.list@gmail.com> wrote:
> Hi Alan,
>
> In the RFC thread "of: Add whitelist", I did not understand the use case and
> asked you some questions (30 Nov 2017 07:46:36 -0500), that you seem to have
> overlooked (or my mail server failed to deliver your answer to me).  Can you
> please answer that question so I can better understand this patch set is
> needed for.

Hi Frank,

Sorry I missed those, I've replied to the original questions now.

Alan

>
> Thanks,
>
> Frank
>
>
> On 12/04/17 14:13, Alan Tull wrote:
>> Restrict which nodes are valid targets for a DT overlay.
>>
>> Add a flag bit to struct device_node allowing nodes to be marked as
>> valid target for overlays.
>>
>> A driver that is always intended to handle DT overlays can
>> enable overlays by calling a function for its DT node.
>>
>> For individual nodes that need to be opened up for a specific use,
>> adding the property "overlay-allowed" enables overlays targeting
>> that node.  I'll need to document the DT property, not sure where
>> specifically.  New file bindings/overlay.txt?
>>
>> This patchset differs from the RFC:
>> * Added a flag bit and got rid of the whitelist
>> * Renamed the functions that enable a node
>> * Added a DT property
>>
>> Alan Tull (2):
>>   of: overlay: add flag enabling overlays and enable fpga-region
>>     overlays
>>   of: dynamic: add overlay-allowed DT property
>>
>>  drivers/fpga/of-fpga-region.c |  4 ++++
>>  drivers/of/base.c             |  4 ++--
>>  drivers/of/dynamic.c          |  3 +++
>>  drivers/of/fdt.c              |  3 +++
>>  drivers/of/of_private.h       |  2 ++
>>  drivers/of/overlay.c          | 26 ++++++++++++++++++++++++++
>>  include/linux/of.h            | 19 +++++++++++++++++++
>>  7 files changed, 59 insertions(+), 2 deletions(-)
>>
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Frank Rowand Dec. 6, 2017, 11:58 a.m. UTC | #5
On 12/05/17 12:07, Alan Tull wrote:
> On Mon, Dec 4, 2017 at 7:14 PM, Frank Rowand <frowand.list@gmail.com> wrote:
>> Hi Alan,
>>
>> In the RFC thread "of: Add whitelist", I did not understand the use case and
>> asked you some questions (30 Nov 2017 07:46:36 -0500), that you seem to have
>> overlooked (or my mail server failed to deliver your answer to me).  Can you
>> please answer that question so I can better understand this patch set is
>> needed for.
> 
> Hi Frank,
> 
> Sorry I missed those, I've replied to the original questions now.

Thanks!  I have now replied to several comments in that thread, hoping to keep
the conversation in one thread instead of split across two threads.

-Frank

> 
> Alan
> 
>>
>> Thanks,
>>
>> Frank
>>
>>
>> On 12/04/17 14:13, Alan Tull wrote:
>>> Restrict which nodes are valid targets for a DT overlay.
>>>
>>> Add a flag bit to struct device_node allowing nodes to be marked as
>>> valid target for overlays.
>>>
>>> A driver that is always intended to handle DT overlays can
>>> enable overlays by calling a function for its DT node.
>>>
>>> For individual nodes that need to be opened up for a specific use,
>>> adding the property "overlay-allowed" enables overlays targeting
>>> that node.  I'll need to document the DT property, not sure where
>>> specifically.  New file bindings/overlay.txt?
>>>
>>> This patchset differs from the RFC:
>>> * Added a flag bit and got rid of the whitelist
>>> * Renamed the functions that enable a node
>>> * Added a DT property
>>>
>>> Alan Tull (2):
>>>   of: overlay: add flag enabling overlays and enable fpga-region
>>>     overlays
>>>   of: dynamic: add overlay-allowed DT property
>>>
>>>  drivers/fpga/of-fpga-region.c |  4 ++++
>>>  drivers/of/base.c             |  4 ++--
>>>  drivers/of/dynamic.c          |  3 +++
>>>  drivers/of/fdt.c              |  3 +++
>>>  drivers/of/of_private.h       |  2 ++
>>>  drivers/of/overlay.c          | 26 ++++++++++++++++++++++++++
>>>  include/linux/of.h            | 19 +++++++++++++++++++
>>>  7 files changed, 59 insertions(+), 2 deletions(-)
>>>
>>
> 

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