linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] drivers/mfd: simple-mfd-i2c: Add generic compatible
@ 2022-12-02 11:32 Jesse Taube
  2022-12-14 18:05 ` Jesse Taube
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Jesse Taube @ 2022-12-02 11:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-input, lee, lee.jones, Mr.Bossman075

Some devices may want to use this driver without having a specific
compatible string. Add a generic compatible string to allow this.

Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
---
 drivers/mfd/simple-mfd-i2c.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c
index f4c8fc3ee463..0bda0dd9276e 100644
--- a/drivers/mfd/simple-mfd-i2c.c
+++ b/drivers/mfd/simple-mfd-i2c.c
@@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = {
 };
 
 static const struct of_device_id simple_mfd_i2c_of_match[] = {
+	{ .compatible = "simple-mfd-i2c-generic" },
 	{ .compatible = "kontron,sl28cpld" },
 	{ .compatible = "silergy,sy7636a", .data = &silergy_sy7636a},
 	{}
-- 
2.38.1


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

* Re: [PATCH v2] drivers/mfd: simple-mfd-i2c: Add generic compatible
  2022-12-02 11:32 [PATCH v2] drivers/mfd: simple-mfd-i2c: Add generic compatible Jesse Taube
@ 2022-12-14 18:05 ` Jesse Taube
  2022-12-23 12:17   ` Lee Jones
  2023-01-05 14:56 ` Lee Jones
  2023-01-19 17:51 ` Rob Herring
  2 siblings, 1 reply; 9+ messages in thread
From: Jesse Taube @ 2022-12-14 18:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-input, lee, lee.jones, michael, Dmitry Torokhov

Are there any updates?

On 12/2/22 06:32, Jesse Taube wrote:
> Some devices may want to use this driver without having a specific
> compatible string. Add a generic compatible string to allow this.
> 
> Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
> ---
>   drivers/mfd/simple-mfd-i2c.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c
> index f4c8fc3ee463..0bda0dd9276e 100644
> --- a/drivers/mfd/simple-mfd-i2c.c
> +++ b/drivers/mfd/simple-mfd-i2c.c
> @@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = {
>   };
>   
>   static const struct of_device_id simple_mfd_i2c_of_match[] = {
> +	{ .compatible = "simple-mfd-i2c-generic" },
>   	{ .compatible = "kontron,sl28cpld" },
>   	{ .compatible = "silergy,sy7636a", .data = &silergy_sy7636a},
>   	{}

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

* Re: [PATCH v2] drivers/mfd: simple-mfd-i2c: Add generic compatible
  2022-12-14 18:05 ` Jesse Taube
@ 2022-12-23 12:17   ` Lee Jones
  0 siblings, 0 replies; 9+ messages in thread
From: Lee Jones @ 2022-12-23 12:17 UTC (permalink / raw)
  To: Jesse Taube
  Cc: linux-kernel, linux-input, lee.jones, michael, Dmitry Torokhov

On Wed, 14 Dec 2022, Jesse Taube wrote:

> Are there any updates?

Please refrain from top-posting.

I'll get around to it after the merge-window has closed.

> On 12/2/22 06:32, Jesse Taube wrote:
> > Some devices may want to use this driver without having a specific
> > compatible string. Add a generic compatible string to allow this.
> > 
> > Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
> > ---
> >   drivers/mfd/simple-mfd-i2c.c | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c
> > index f4c8fc3ee463..0bda0dd9276e 100644
> > --- a/drivers/mfd/simple-mfd-i2c.c
> > +++ b/drivers/mfd/simple-mfd-i2c.c
> > @@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = {
> >   };
> >   static const struct of_device_id simple_mfd_i2c_of_match[] = {
> > +	{ .compatible = "simple-mfd-i2c-generic" },
> >   	{ .compatible = "kontron,sl28cpld" },
> >   	{ .compatible = "silergy,sy7636a", .data = &silergy_sy7636a},
> >   	{}

-- 
Lee Jones [李琼斯]

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

* Re: [PATCH v2] drivers/mfd: simple-mfd-i2c: Add generic compatible
  2022-12-02 11:32 [PATCH v2] drivers/mfd: simple-mfd-i2c: Add generic compatible Jesse Taube
  2022-12-14 18:05 ` Jesse Taube
@ 2023-01-05 14:56 ` Lee Jones
  2023-01-19 17:51 ` Rob Herring
  2 siblings, 0 replies; 9+ messages in thread
From: Lee Jones @ 2023-01-05 14:56 UTC (permalink / raw)
  To: Jesse Taube; +Cc: linux-kernel, linux-input, lee.jones

On Fri, 02 Dec 2022, Jesse Taube wrote:

> Some devices may want to use this driver without having a specific
> compatible string. Add a generic compatible string to allow this.
> 
> Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
> ---
>  drivers/mfd/simple-mfd-i2c.c | 1 +
>  1 file changed, 1 insertion(+)

Sounds like a good idea.  I've changed the subject line a little (no
need to say 'drivers') and applied the patch, thanks.

> diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c
> index f4c8fc3ee463..0bda0dd9276e 100644
> --- a/drivers/mfd/simple-mfd-i2c.c
> +++ b/drivers/mfd/simple-mfd-i2c.c
> @@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = {
>  };
>  
>  static const struct of_device_id simple_mfd_i2c_of_match[] = {
> +	{ .compatible = "simple-mfd-i2c-generic" },
>  	{ .compatible = "kontron,sl28cpld" },
>  	{ .compatible = "silergy,sy7636a", .data = &silergy_sy7636a},
>  	{}
> -- 
> 2.38.1
> 

-- 
Lee Jones [李琼斯]

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

* Re: [PATCH v2] drivers/mfd: simple-mfd-i2c: Add generic compatible
  2022-12-02 11:32 [PATCH v2] drivers/mfd: simple-mfd-i2c: Add generic compatible Jesse Taube
  2022-12-14 18:05 ` Jesse Taube
  2023-01-05 14:56 ` Lee Jones
@ 2023-01-19 17:51 ` Rob Herring
  2023-01-19 20:54   ` Lee Jones
  2 siblings, 1 reply; 9+ messages in thread
From: Rob Herring @ 2023-01-19 17:51 UTC (permalink / raw)
  To: Jesse Taube; +Cc: linux-kernel, linux-input, lee, lee.jones

On Fri, Dec 02, 2022 at 06:32:26AM -0500, Jesse Taube wrote:
> Some devices may want to use this driver without having a specific
> compatible string. Add a generic compatible string to allow this.

What devices need this?

Is that no specific compatible string at all or just in the kernel? 
Because the former definitely goes against DT requirements. The latter 
enables the former without a schema.

> 
> Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
> ---
>  drivers/mfd/simple-mfd-i2c.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c
> index f4c8fc3ee463..0bda0dd9276e 100644
> --- a/drivers/mfd/simple-mfd-i2c.c
> +++ b/drivers/mfd/simple-mfd-i2c.c
> @@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = {
>  };
>  
>  static const struct of_device_id simple_mfd_i2c_of_match[] = {
> +	{ .compatible = "simple-mfd-i2c-generic" },

Simple and generic? There is no such device. Anywhere.

This is also not documented which is how I found it (make 
dt_compatible_check). But this should be reverted or dropped rather than 
documented IMO.

Rob

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

* Re: [PATCH v2] drivers/mfd: simple-mfd-i2c: Add generic compatible
  2023-01-19 17:51 ` Rob Herring
@ 2023-01-19 20:54   ` Lee Jones
  2023-01-19 21:32     ` Jesse Taube
  2023-01-20 14:14     ` Rob Herring
  0 siblings, 2 replies; 9+ messages in thread
From: Lee Jones @ 2023-01-19 20:54 UTC (permalink / raw)
  To: Rob Herring; +Cc: Jesse Taube, linux-kernel, linux-input, lee.jones

On Thu, 19 Jan 2023, Rob Herring wrote:

> On Fri, Dec 02, 2022 at 06:32:26AM -0500, Jesse Taube wrote:
> > Some devices may want to use this driver without having a specific
> > compatible string. Add a generic compatible string to allow this.
> 
> What devices need this?
> 
> Is that no specific compatible string at all or just in the kernel? 
> Because the former definitely goes against DT requirements. The latter 
> enables the former without a schema.
> 
> > 
> > Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
> > ---
> >  drivers/mfd/simple-mfd-i2c.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c
> > index f4c8fc3ee463..0bda0dd9276e 100644
> > --- a/drivers/mfd/simple-mfd-i2c.c
> > +++ b/drivers/mfd/simple-mfd-i2c.c
> > @@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = {
> >  };
> >  
> >  static const struct of_device_id simple_mfd_i2c_of_match[] = {
> > +	{ .compatible = "simple-mfd-i2c-generic" },
> 
> Simple and generic? There is no such device. Anywhere.
> 
> This is also not documented which is how I found it (make 
> dt_compatible_check). But this should be reverted or dropped rather than 
> documented IMO.

I thought it would be better than having a huge list here.

Devices should *also* be allocated a specific compatible string.

$ git grep simple-mfd -- arch

-- 
Lee Jones [李琼斯]

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

* Re: [PATCH v2] drivers/mfd: simple-mfd-i2c: Add generic compatible
  2023-01-19 20:54   ` Lee Jones
@ 2023-01-19 21:32     ` Jesse Taube
  2023-01-20 14:14     ` Rob Herring
  1 sibling, 0 replies; 9+ messages in thread
From: Jesse Taube @ 2023-01-19 21:32 UTC (permalink / raw)
  To: Lee Jones, Rob Herring; +Cc: linux-kernel, linux-input, lee.jones



On 1/19/23 15:54, Lee Jones wrote:
> On Thu, 19 Jan 2023, Rob Herring wrote:
> 
>> On Fri, Dec 02, 2022 at 06:32:26AM -0500, Jesse Taube wrote:
>>> Some devices may want to use this driver without having a specific
>>> compatible string. Add a generic compatible string to allow this.
>>
>> What devices need this?
>>
>> Is that no specific compatible string at all or just in the kernel?
>> Because the former definitely goes against DT requirements. The latter
>> enables the former without a schema.
>>
>>>
>>> Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
>>> ---
>>>   drivers/mfd/simple-mfd-i2c.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c
>>> index f4c8fc3ee463..0bda0dd9276e 100644
>>> --- a/drivers/mfd/simple-mfd-i2c.c
>>> +++ b/drivers/mfd/simple-mfd-i2c.c
>>> @@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = {
>>>   };
>>>   
>>>   static const struct of_device_id simple_mfd_i2c_of_match[] = {
>>> +	{ .compatible = "simple-mfd-i2c-generic" },
>>
>> Simple and generic? There is no such device. Anywhere.
>>
>> This is also not documented which is how I found it (make
>> dt_compatible_check).
I will write docs if needed.
But this should be reverted or dropped rather than
>> documented IMO.
Hi Rob, sorry for the disturbance. The reason I submitted this patch is 
this driver is generic and can be used by many different devices. Adding 
a generic compatible handle allows device tree writers avoid editing the 
  C source. I also will be submitting device trees that use this in the 
future if added.
Thanks,
Jesse Taube
> 
> I thought it would be better than having a huge list here.
> 
> Devices should *also* be allocated a specific compatible string.
> 
> $ git grep simple-mfd -- arch
> 

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

* Re: [PATCH v2] drivers/mfd: simple-mfd-i2c: Add generic compatible
  2023-01-19 20:54   ` Lee Jones
  2023-01-19 21:32     ` Jesse Taube
@ 2023-01-20 14:14     ` Rob Herring
  2023-01-26 14:32       ` Lee Jones
  1 sibling, 1 reply; 9+ messages in thread
From: Rob Herring @ 2023-01-20 14:14 UTC (permalink / raw)
  To: Lee Jones; +Cc: Jesse Taube, linux-kernel, linux-input, lee.jones

On Thu, Jan 19, 2023 at 2:54 PM Lee Jones <lee@kernel.org> wrote:
>
> On Thu, 19 Jan 2023, Rob Herring wrote:
>
> > On Fri, Dec 02, 2022 at 06:32:26AM -0500, Jesse Taube wrote:
> > > Some devices may want to use this driver without having a specific
> > > compatible string. Add a generic compatible string to allow this.
> >
> > What devices need this?
> >
> > Is that no specific compatible string at all or just in the kernel?
> > Because the former definitely goes against DT requirements. The latter
> > enables the former without a schema.
> >
> > >
> > > Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
> > > ---
> > >  drivers/mfd/simple-mfd-i2c.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c
> > > index f4c8fc3ee463..0bda0dd9276e 100644
> > > --- a/drivers/mfd/simple-mfd-i2c.c
> > > +++ b/drivers/mfd/simple-mfd-i2c.c
> > > @@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = {
> > >  };
> > >
> > >  static const struct of_device_id simple_mfd_i2c_of_match[] = {
> > > +   { .compatible = "simple-mfd-i2c-generic" },
> >
> > Simple and generic? There is no such device. Anywhere.
> >
> > This is also not documented which is how I found it (make
> > dt_compatible_check). But this should be reverted or dropped rather than
> > documented IMO.
>
> I thought it would be better than having a huge list here.

What indication is there that the list would be huge? We have 2 out of
137 MFD bindings. Usually if the MFD is simple, we'd make it a single
node. It just needs to be clear what the conditions are for using it.

> Devices should *also* be allocated a specific compatible string.
>
> $ git grep simple-mfd -- arch

Why can't simple-mfd be used here?

Rob

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

* Re: [PATCH v2] drivers/mfd: simple-mfd-i2c: Add generic compatible
  2023-01-20 14:14     ` Rob Herring
@ 2023-01-26 14:32       ` Lee Jones
  0 siblings, 0 replies; 9+ messages in thread
From: Lee Jones @ 2023-01-26 14:32 UTC (permalink / raw)
  To: Rob Herring; +Cc: Jesse Taube, linux-kernel, linux-input, lee.jones

On Fri, 20 Jan 2023, Rob Herring wrote:

> On Thu, Jan 19, 2023 at 2:54 PM Lee Jones <lee@kernel.org> wrote:
> >
> > On Thu, 19 Jan 2023, Rob Herring wrote:
> >
> > > On Fri, Dec 02, 2022 at 06:32:26AM -0500, Jesse Taube wrote:
> > > > Some devices may want to use this driver without having a specific
> > > > compatible string. Add a generic compatible string to allow this.
> > >
> > > What devices need this?
> > >
> > > Is that no specific compatible string at all or just in the kernel?
> > > Because the former definitely goes against DT requirements. The latter
> > > enables the former without a schema.
> > >
> > > >
> > > > Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
> > > > ---
> > > >  drivers/mfd/simple-mfd-i2c.c | 1 +
> > > >  1 file changed, 1 insertion(+)
> > > >
> > > > diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c
> > > > index f4c8fc3ee463..0bda0dd9276e 100644
> > > > --- a/drivers/mfd/simple-mfd-i2c.c
> > > > +++ b/drivers/mfd/simple-mfd-i2c.c
> > > > @@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = {
> > > >  };
> > > >
> > > >  static const struct of_device_id simple_mfd_i2c_of_match[] = {
> > > > +   { .compatible = "simple-mfd-i2c-generic" },
> > >
> > > Simple and generic? There is no such device. Anywhere.
> > >
> > > This is also not documented which is how I found it (make
> > > dt_compatible_check). But this should be reverted or dropped rather than
> > > documented IMO.
> >
> > I thought it would be better than having a huge list here.
> 
> What indication is there that the list would be huge? We have 2 out of
> 137 MFD bindings. Usually if the MFD is simple, we'd make it a single
> node. It just needs to be clear what the conditions are for using it.
> 
> > Devices should *also* be allocated a specific compatible string.
> >
> > $ git grep simple-mfd -- arch
> 
> Why can't simple-mfd be used here?

Until this is clarified, agreed and documented, I'm dropping the patch.

-- 
Lee Jones [李琼斯]

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

end of thread, other threads:[~2023-01-26 14:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-02 11:32 [PATCH v2] drivers/mfd: simple-mfd-i2c: Add generic compatible Jesse Taube
2022-12-14 18:05 ` Jesse Taube
2022-12-23 12:17   ` Lee Jones
2023-01-05 14:56 ` Lee Jones
2023-01-19 17:51 ` Rob Herring
2023-01-19 20:54   ` Lee Jones
2023-01-19 21:32     ` Jesse Taube
2023-01-20 14:14     ` Rob Herring
2023-01-26 14:32       ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).