Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-10-11 Thread Heikki Krogerus
Hi Dmitry, Sorry for the late reply. I decided to give this a try myself, and I've now prepared something (not for the gpio stuff!). I'll do a quick internal review round, and send it to you guys as RFC after that.. On Fri, Oct 05, 2018 at 02:47:34PM -0700, Dmitry Torokhov wrote: > Hi Heikki, >

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-10-11 Thread Heikki Krogerus
Hi Dmitry, Sorry for the late reply. I decided to give this a try myself, and I've now prepared something (not for the gpio stuff!). I'll do a quick internal review round, and send it to you guys as RFC after that.. On Fri, Oct 05, 2018 at 02:47:34PM -0700, Dmitry Torokhov wrote: > Hi Heikki, >

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-10-05 Thread Dmitry Torokhov
Hi Heikki, On Tue, Sep 25, 2018 at 03:19:27PM +0300, Heikki Krogerus wrote: > On Mon, Sep 24, 2018 at 11:45:43AM -0700, Dmitry Torokhov wrote: > > I think we are talking about totally different use cases and that is why > > we are having hard time coming to a mutually agreeable solution. Could >

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-10-05 Thread Dmitry Torokhov
Hi Heikki, On Tue, Sep 25, 2018 at 03:19:27PM +0300, Heikki Krogerus wrote: > On Mon, Sep 24, 2018 at 11:45:43AM -0700, Dmitry Torokhov wrote: > > I think we are talking about totally different use cases and that is why > > we are having hard time coming to a mutually agreeable solution. Could >

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-25 Thread Heikki Krogerus
On Mon, Sep 24, 2018 at 11:45:43AM -0700, Dmitry Torokhov wrote: > I think we are talking about totally different use cases and that is why > we are having hard time coming to a mutually agreeable solution. Could > you please describe in more detail what you would like to achieve, > and preferably

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-25 Thread Heikki Krogerus
On Mon, Sep 24, 2018 at 11:45:43AM -0700, Dmitry Torokhov wrote: > I think we are talking about totally different use cases and that is why > we are having hard time coming to a mutually agreeable solution. Could > you please describe in more detail what you would like to achieve, > and preferably

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-24 Thread Dmitry Torokhov
On Mon, Sep 24, 2018 at 04:20:50PM +0300, Heikki Krogerus wrote: > Hi Dmitry, > > On Fri, Sep 21, 2018 at 04:31:19PM -0700, Dmitry Torokhov wrote: > > > > + if (!parent_pset) > > > > + return ERR_PTR(-EINVAL); > > > > + > > > > + p = pset_create_set(properties); > > > >

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-24 Thread Dmitry Torokhov
On Mon, Sep 24, 2018 at 04:20:50PM +0300, Heikki Krogerus wrote: > Hi Dmitry, > > On Fri, Sep 21, 2018 at 04:31:19PM -0700, Dmitry Torokhov wrote: > > > > + if (!parent_pset) > > > > + return ERR_PTR(-EINVAL); > > > > + > > > > + p = pset_create_set(properties); > > > >

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-24 Thread Heikki Krogerus
Hi Dmitry, On Fri, Sep 21, 2018 at 04:31:19PM -0700, Dmitry Torokhov wrote: > > > + if (!parent_pset) > > > + return ERR_PTR(-EINVAL); > > > + > > > + p = pset_create_set(properties); > > > + if (IS_ERR(p)) > > > + return ERR_CAST(p); > > > + > > > + p->dev = dev; > > > > That

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-24 Thread Heikki Krogerus
Hi Dmitry, On Fri, Sep 21, 2018 at 04:31:19PM -0700, Dmitry Torokhov wrote: > > > + if (!parent_pset) > > > + return ERR_PTR(-EINVAL); > > > + > > > + p = pset_create_set(properties); > > > + if (IS_ERR(p)) > > > + return ERR_CAST(p); > > > + > > > + p->dev = dev; > > > > That

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-24 Thread Heikki Krogerus
Hi Linus, On Fri, Sep 21, 2018 at 08:36:53AM -0700, Linus Walleij wrote: > On Thu, Sep 20, 2018 at 6:53 AM Heikki Krogerus > wrote: > > > The child nodes will change the purpose of the build-in property > > support. Originally the goal was just to support adding of build-in > > device

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-24 Thread Heikki Krogerus
Hi Linus, On Fri, Sep 21, 2018 at 08:36:53AM -0700, Linus Walleij wrote: > On Thu, Sep 20, 2018 at 6:53 AM Heikki Krogerus > wrote: > > > The child nodes will change the purpose of the build-in property > > support. Originally the goal was just to support adding of build-in > > device

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-24 Thread Heikki Krogerus
On Fri, Sep 21, 2018 at 04:33:36PM -0700, Dmitry Torokhov wrote: > On Thu, Sep 20, 2018 at 01:16:48PM +0300, Heikki Krogerus wrote: > > On Wed, Sep 19, 2018 at 10:13:26AM -0700, Dmitry Torokhov wrote: > > > > > diff --git a/drivers/base/pset_property.c > > > > > b/drivers/base/pset_property.c > >

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-24 Thread Heikki Krogerus
On Fri, Sep 21, 2018 at 04:33:36PM -0700, Dmitry Torokhov wrote: > On Thu, Sep 20, 2018 at 01:16:48PM +0300, Heikki Krogerus wrote: > > On Wed, Sep 19, 2018 at 10:13:26AM -0700, Dmitry Torokhov wrote: > > > > > diff --git a/drivers/base/pset_property.c > > > > > b/drivers/base/pset_property.c > >

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-21 Thread Dmitry Torokhov
On Thu, Sep 20, 2018 at 01:16:48PM +0300, Heikki Krogerus wrote: > On Wed, Sep 19, 2018 at 10:13:26AM -0700, Dmitry Torokhov wrote: > > > > diff --git a/drivers/base/pset_property.c b/drivers/base/pset_property.c > > > > index 08ecc13080ae..63f2377aefe8 100644 > > > > ---

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-21 Thread Dmitry Torokhov
On Thu, Sep 20, 2018 at 01:16:48PM +0300, Heikki Krogerus wrote: > On Wed, Sep 19, 2018 at 10:13:26AM -0700, Dmitry Torokhov wrote: > > > > diff --git a/drivers/base/pset_property.c b/drivers/base/pset_property.c > > > > index 08ecc13080ae..63f2377aefe8 100644 > > > > ---

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-21 Thread Dmitry Torokhov
Hi Heikki, On Thu, Sep 20, 2018 at 04:53:48PM +0300, Heikki Krogerus wrote: > Hi Dmitry, > > On Mon, Sep 17, 2018 at 11:16:00AM -0700, Dmitry Torokhov wrote: > > +/** > > + * device_add_child_properties - Add a collection of properties to a > > device object. > > + * @dev: Device to add

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-21 Thread Dmitry Torokhov
Hi Heikki, On Thu, Sep 20, 2018 at 04:53:48PM +0300, Heikki Krogerus wrote: > Hi Dmitry, > > On Mon, Sep 17, 2018 at 11:16:00AM -0700, Dmitry Torokhov wrote: > > +/** > > + * device_add_child_properties - Add a collection of properties to a > > device object. > > + * @dev: Device to add

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-21 Thread Linus Walleij
On Thu, Sep 20, 2018 at 6:53 AM Heikki Krogerus wrote: > The child nodes will change the purpose of the build-in property > support. Originally the goal was just to support adding of build-in > device properties to real firmware nodes, but things have changed > quite a bit from that. These child

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-21 Thread Linus Walleij
On Thu, Sep 20, 2018 at 6:53 AM Heikki Krogerus wrote: > The child nodes will change the purpose of the build-in property > support. Originally the goal was just to support adding of build-in > device properties to real firmware nodes, but things have changed > quite a bit from that. These child

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-20 Thread Heikki Krogerus
Hi Dmitry, On Mon, Sep 17, 2018 at 11:16:00AM -0700, Dmitry Torokhov wrote: > +/** > + * device_add_child_properties - Add a collection of properties to a device > object. > + * @dev: Device to add properties to. In case you didn't notice my comment for this, you are missing @parent here. But

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-20 Thread Heikki Krogerus
Hi Dmitry, On Mon, Sep 17, 2018 at 11:16:00AM -0700, Dmitry Torokhov wrote: > +/** > + * device_add_child_properties - Add a collection of properties to a device > object. > + * @dev: Device to add properties to. In case you didn't notice my comment for this, you are missing @parent here. But

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-20 Thread Heikki Krogerus
On Wed, Sep 19, 2018 at 10:13:26AM -0700, Dmitry Torokhov wrote: > > > diff --git a/drivers/base/pset_property.c b/drivers/base/pset_property.c > > > index 08ecc13080ae..63f2377aefe8 100644 > > > --- a/drivers/base/pset_property.c > > > +++ b/drivers/base/pset_property.c > > > @@ -18,6 +18,11 @@

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-20 Thread Heikki Krogerus
On Wed, Sep 19, 2018 at 10:13:26AM -0700, Dmitry Torokhov wrote: > > > diff --git a/drivers/base/pset_property.c b/drivers/base/pset_property.c > > > index 08ecc13080ae..63f2377aefe8 100644 > > > --- a/drivers/base/pset_property.c > > > +++ b/drivers/base/pset_property.c > > > @@ -18,6 +18,11 @@

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-19 Thread Dmitry Torokhov
Hi Heikki, On Wed, Sep 19, 2018 at 06:10:26PM +0300, Heikki Krogerus wrote: > Hi, > > On Mon, Sep 17, 2018 at 11:16:00AM -0700, Dmitry Torokhov wrote: > > Several drivers rely on having notion of sub-nodes when describing > > hardware, let's allow static board-defined properties also have it. >

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-19 Thread Dmitry Torokhov
Hi Heikki, On Wed, Sep 19, 2018 at 06:10:26PM +0300, Heikki Krogerus wrote: > Hi, > > On Mon, Sep 17, 2018 at 11:16:00AM -0700, Dmitry Torokhov wrote: > > Several drivers rely on having notion of sub-nodes when describing > > hardware, let's allow static board-defined properties also have it. >

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-19 Thread Heikki Krogerus
Hi, On Mon, Sep 17, 2018 at 11:16:00AM -0700, Dmitry Torokhov wrote: > Several drivers rely on having notion of sub-nodes when describing > hardware, let's allow static board-defined properties also have it. > > The board files will then attach properties to devices in the following > fashion: >

Re: [RFC/PATCH 2/5] device property: introduce notion of subnodes for legacy boards

2018-09-19 Thread Heikki Krogerus
Hi, On Mon, Sep 17, 2018 at 11:16:00AM -0700, Dmitry Torokhov wrote: > Several drivers rely on having notion of sub-nodes when describing > hardware, let's allow static board-defined properties also have it. > > The board files will then attach properties to devices in the following > fashion: >