All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/3] gpio: adp5588: Switch from of headers to mod_devicetable.h
@ 2022-06-28 19:39 Andy Shevchenko
  2022-06-28 19:39 ` [PATCH v1 2/3] gpio: adp5588: Do not use defined value for driver name and compatible Andy Shevchenko
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Andy Shevchenko @ 2022-06-28 19:39 UTC (permalink / raw)
  To: Andy Shevchenko, linux-gpio, linux-kernel
  Cc: Michael Hennerich, Linus Walleij, Bartosz Golaszewski

There is nothing directly using of specific interfaces in this driver,
so lets not include the headers.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/gpio/gpio-adp5588.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpio/gpio-adp5588.c b/drivers/gpio/gpio-adp5588.c
index e388e75103f4..51ed23ba4645 100644
--- a/drivers/gpio/gpio-adp5588.c
+++ b/drivers/gpio/gpio-adp5588.c
@@ -6,7 +6,6 @@
  * Copyright 2009-2010 Analog Devices Inc.
  */
 
-#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
 #include <linux/init.h>
@@ -14,7 +13,8 @@
 #include <linux/gpio/driver.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
-#include <linux/of_device.h>
+#include <linux/mod_devicetable.h>
+#include <linux/module.h>
 
 #include <linux/platform_data/adp5588.h>
 
@@ -427,18 +427,16 @@ static const struct i2c_device_id adp5588_gpio_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, adp5588_gpio_id);
 
-#ifdef CONFIG_OF
 static const struct of_device_id adp5588_gpio_of_id[] = {
 	{ .compatible = "adi," DRV_NAME, },
 	{},
 };
 MODULE_DEVICE_TABLE(of, adp5588_gpio_of_id);
-#endif
 
 static struct i2c_driver adp5588_gpio_driver = {
 	.driver = {
 		.name = DRV_NAME,
-		.of_match_table = of_match_ptr(adp5588_gpio_of_id),
+		.of_match_table = adp5588_gpio_of_id,
 	},
 	.probe_new = adp5588_gpio_probe,
 	.remove = adp5588_gpio_remove,
-- 
2.35.1


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

* [PATCH v1 2/3] gpio: adp5588: Do not use defined value for driver name and compatible
  2022-06-28 19:39 [PATCH v1 1/3] gpio: adp5588: Switch from of headers to mod_devicetable.h Andy Shevchenko
@ 2022-06-28 19:39 ` Andy Shevchenko
  2022-06-30 11:58   ` Linus Walleij
  2022-06-28 19:39 ` [PATCH v1 3/3] gpio: adp5588: sort header inclusion alphabetically Andy Shevchenko
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2022-06-28 19:39 UTC (permalink / raw)
  To: Andy Shevchenko, linux-gpio, linux-kernel
  Cc: Michael Hennerich, Linus Walleij, Bartosz Golaszewski

It's wrong to use defined string literal for three semantically different
cases, i.e.:
1) compatible string, which is part of ABI and has to have specific format;
2) I2C ID, which is user space visible and also ABI;
3) driver name, that can be changed.

Drop the define and use appropriate string literals in place.

While at it, drop comma at terminator entry of OF ID table.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/gpio/gpio-adp5588.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/gpio/gpio-adp5588.c b/drivers/gpio/gpio-adp5588.c
index 51ed23ba4645..d6a229a67044 100644
--- a/drivers/gpio/gpio-adp5588.c
+++ b/drivers/gpio/gpio-adp5588.c
@@ -18,8 +18,6 @@
 
 #include <linux/platform_data/adp5588.h>
 
-#define DRV_NAME	"adp5588-gpio"
-
 /*
  * Early pre 4.0 Silicon required to delay readout by at least 25ms,
  * since the Event Counter Register updated 25ms after the interrupt
@@ -422,20 +420,20 @@ static int adp5588_gpio_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id adp5588_gpio_id[] = {
-	{DRV_NAME, 0},
+	{ "adp5588-gpio" },
 	{}
 };
 MODULE_DEVICE_TABLE(i2c, adp5588_gpio_id);
 
 static const struct of_device_id adp5588_gpio_of_id[] = {
-	{ .compatible = "adi," DRV_NAME, },
-	{},
+	{ .compatible = "adi,adp5588-gpio" },
+	{}
 };
 MODULE_DEVICE_TABLE(of, adp5588_gpio_of_id);
 
 static struct i2c_driver adp5588_gpio_driver = {
 	.driver = {
-		.name = DRV_NAME,
+		.name = "adp5588-gpio",
 		.of_match_table = adp5588_gpio_of_id,
 	},
 	.probe_new = adp5588_gpio_probe,
-- 
2.35.1


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

* [PATCH v1 3/3] gpio: adp5588: sort header inclusion alphabetically
  2022-06-28 19:39 [PATCH v1 1/3] gpio: adp5588: Switch from of headers to mod_devicetable.h Andy Shevchenko
  2022-06-28 19:39 ` [PATCH v1 2/3] gpio: adp5588: Do not use defined value for driver name and compatible Andy Shevchenko
@ 2022-06-28 19:39 ` Andy Shevchenko
  2022-06-29  8:40   ` Hennerich, Michael
  2022-06-30 11:57 ` [PATCH v1 1/3] gpio: adp5588: Switch from of headers to mod_devicetable.h Linus Walleij
  2022-07-06 12:23 ` Bartosz Golaszewski
  3 siblings, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2022-06-28 19:39 UTC (permalink / raw)
  To: Andy Shevchenko, linux-gpio, linux-kernel
  Cc: Michael Hennerich, Linus Walleij, Bartosz Golaszewski

Sort header inclusion alphabetically.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/gpio/gpio-adp5588.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-adp5588.c b/drivers/gpio/gpio-adp5588.c
index d6a229a67044..d49f12560cde 100644
--- a/drivers/gpio/gpio-adp5588.c
+++ b/drivers/gpio/gpio-adp5588.c
@@ -6,15 +6,15 @@
  * Copyright 2009-2010 Analog Devices Inc.
  */
 
-#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/init.h>
-#include <linux/i2c.h>
 #include <linux/gpio/driver.h>
+#include <linux/i2c.h>
+#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
+#include <linux/kernel.h>
 #include <linux/mod_devicetable.h>
 #include <linux/module.h>
+#include <linux/slab.h>
 
 #include <linux/platform_data/adp5588.h>
 
-- 
2.35.1


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

* RE: [PATCH v1 3/3] gpio: adp5588: sort header inclusion alphabetically
  2022-06-28 19:39 ` [PATCH v1 3/3] gpio: adp5588: sort header inclusion alphabetically Andy Shevchenko
@ 2022-06-29  8:40   ` Hennerich, Michael
  2022-06-29  9:59     ` Andy Shevchenko
  0 siblings, 1 reply; 14+ messages in thread
From: Hennerich, Michael @ 2022-06-29  8:40 UTC (permalink / raw)
  To: Andy Shevchenko, linux-gpio, linux-kernel, Sa, Nuno
  Cc: Linus Walleij, Bartosz Golaszewski



> -----Original Message-----
> From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Sent: Dienstag, 28. Juni 2022 21:39
> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>; linux-
> gpio@vger.kernel.org; linux-kernel@vger.kernel.org
> Cc: Hennerich, Michael <Michael.Hennerich@analog.com>; Linus Walleij
> <linus.walleij@linaro.org>; Bartosz Golaszewski <brgl@bgdev.pl>
> Subject: [PATCH v1 3/3] gpio: adp5588: sort header inclusion alphabetically
> 
> 
> Sort header inclusion alphabetically.

Hi Andy,

Thanks for the patches, they look good.
However, Nuno is currently working on getting the irqchip support into the
adp5588 input driver. In his patch series this driver is going away.

https://lore.kernel.org/linux-input/YpMCh1Xje+jsny8j@google.com/

Michael 

> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/gpio/gpio-adp5588.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-adp5588.c b/drivers/gpio/gpio-adp5588.c index
> d6a229a67044..d49f12560cde 100644
> --- a/drivers/gpio/gpio-adp5588.c
> +++ b/drivers/gpio/gpio-adp5588.c
> @@ -6,15 +6,15 @@
>   * Copyright 2009-2010 Analog Devices Inc.
>   */
> 
> -#include <linux/kernel.h>
> -#include <linux/slab.h>
> -#include <linux/init.h>
> -#include <linux/i2c.h>
>  #include <linux/gpio/driver.h>
> +#include <linux/i2c.h>
> +#include <linux/init.h>
>  #include <linux/interrupt.h>
>  #include <linux/irq.h>
> +#include <linux/kernel.h>
>  #include <linux/mod_devicetable.h>
>  #include <linux/module.h>
> +#include <linux/slab.h>
> 
>  #include <linux/platform_data/adp5588.h>
> 
> --
> 2.35.1


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

* Re: [PATCH v1 3/3] gpio: adp5588: sort header inclusion alphabetically
  2022-06-29  8:40   ` Hennerich, Michael
@ 2022-06-29  9:59     ` Andy Shevchenko
  2022-06-29 10:09       ` Sa, Nuno
  0 siblings, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2022-06-29  9:59 UTC (permalink / raw)
  To: Hennerich, Michael
  Cc: Andy Shevchenko, linux-gpio, linux-kernel, Sa, Nuno,
	Linus Walleij, Bartosz Golaszewski

On Wed, Jun 29, 2022 at 10:50 AM Hennerich, Michael
<Michael.Hennerich@analog.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Sent: Dienstag, 28. Juni 2022 21:39
> > To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>; linux-
> > gpio@vger.kernel.org; linux-kernel@vger.kernel.org
> > Cc: Hennerich, Michael <Michael.Hennerich@analog.com>; Linus Walleij
> > <linus.walleij@linaro.org>; Bartosz Golaszewski <brgl@bgdev.pl>
> > Subject: [PATCH v1 3/3] gpio: adp5588: sort header inclusion alphabetically
> >
> > Sort header inclusion alphabetically.
>
> Thanks for the patches, they look good.
> However, Nuno is currently working on getting the irqchip support into the
> adp5588 input driver. In his patch series this driver is going away.
>
> https://lore.kernel.org/linux-input/YpMCh1Xje+jsny8j@google.com/

While that work is ongoing, and most likely won't make v5.20-rc1, for
the v5.20-rc1 I think my patches are good to go to avoid a bad (or
rather very old) example on how to do GPIO drivers. What do you think?

-- 
With Best Regards,
Andy Shevchenko

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

* RE: [PATCH v1 3/3] gpio: adp5588: sort header inclusion alphabetically
  2022-06-29  9:59     ` Andy Shevchenko
@ 2022-06-29 10:09       ` Sa, Nuno
  2022-06-29 10:33         ` Andy Shevchenko
  0 siblings, 1 reply; 14+ messages in thread
From: Sa, Nuno @ 2022-06-29 10:09 UTC (permalink / raw)
  To: Andy Shevchenko, Hennerich, Michael
  Cc: Andy Shevchenko, linux-gpio, linux-kernel, Linus Walleij,
	Bartosz Golaszewski

Hi Andy,

> From: Andy Shevchenko <andy.shevchenko@gmail.com>
> Sent: Wednesday, June 29, 2022 12:00 PM
> To: Hennerich, Michael <Michael.Hennerich@analog.com>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>; linux-
> gpio@vger.kernel.org; linux-kernel@vger.kernel.org; Sa, Nuno
> <Nuno.Sa@analog.com>; Linus Walleij <linus.walleij@linaro.org>;
> Bartosz Golaszewski <brgl@bgdev.pl>
> Subject: Re: [PATCH v1 3/3] gpio: adp5588: sort header inclusion
> alphabetically
> 
> [External]
> 
> On Wed, Jun 29, 2022 at 10:50 AM Hennerich, Michael
> <Michael.Hennerich@analog.com> wrote:
> >
> >
> >
> > > -----Original Message-----
> > > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > Sent: Dienstag, 28. Juni 2022 21:39
> > > To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>;
> linux-
> > > gpio@vger.kernel.org; linux-kernel@vger.kernel.org
> > > Cc: Hennerich, Michael <Michael.Hennerich@analog.com>; Linus
> Walleij
> > > <linus.walleij@linaro.org>; Bartosz Golaszewski <brgl@bgdev.pl>
> > > Subject: [PATCH v1 3/3] gpio: adp5588: sort header inclusion
> alphabetically
> > >
> > > Sort header inclusion alphabetically.
> >
> > Thanks for the patches, they look good.
> > However, Nuno is currently working on getting the irqchip support
> into the
> > adp5588 input driver. In his patch series this driver is going away.
> >
> > https://urldefense.com/v3/__https://lore.kernel.org/linux-
> input/YpMCh1Xje*jsny8j@google.com/__;Kw!!A3Ni8CS0y2Y!_Cb1uAs
> D-
> Z6iz_zSDfrd5Va6zLmdoxjv1vLYWQGHDOqYniaXVVHl3Ou2lOUQIjwhSN
> Ku2aZkYrOb8xMi2cZtfmsv$
> 
> While that work is ongoing, and most likely won't make v5.20-rc1, for
> the v5.20-rc1 I think my patches are good to go to avoid a bad (or
> rather very old) example on how to do GPIO drivers. What do you
> think?
> 

Just as note, If nothing unexpected happens, I'm planning in sending this
out today. If you still think this makes sense, fine by me. It's a very minimal
change that won't give much pain to deal with...

- Nuno Sá

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

* Re: [PATCH v1 3/3] gpio: adp5588: sort header inclusion alphabetically
  2022-06-29 10:09       ` Sa, Nuno
@ 2022-06-29 10:33         ` Andy Shevchenko
  2022-06-29 10:34           ` Andy Shevchenko
  2022-06-29 10:40           ` Sa, Nuno
  0 siblings, 2 replies; 14+ messages in thread
From: Andy Shevchenko @ 2022-06-29 10:33 UTC (permalink / raw)
  To: Sa, Nuno
  Cc: Hennerich, Michael, Andy Shevchenko, linux-gpio, linux-kernel,
	Linus Walleij, Bartosz Golaszewski

On Wed, Jun 29, 2022 at 12:10 PM Sa, Nuno <Nuno.Sa@analog.com> wrote:
> > From: Andy Shevchenko <andy.shevchenko@gmail.com>
> > Sent: Wednesday, June 29, 2022 12:00 PM
> > On Wed, Jun 29, 2022 at 10:50 AM Hennerich, Michael
> > <Michael.Hennerich@analog.com> wrote:
> > > > -----Original Message-----
> > > > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > > Sent: Dienstag, 28. Juni 2022 21:39

...

> > > > Sort header inclusion alphabetically.
> > >
> > > Thanks for the patches, they look good.
> > > However, Nuno is currently working on getting the irqchip support
> > into the
> > > adp5588 input driver. In his patch series this driver is going away.
> > >
> > > https://urldefense.com/v3/__https://lore.kernel.org/linux-
> > input/YpMCh1Xje*jsny8j@google.com/__;Kw!!A3Ni8CS0y2Y!_Cb1uAs
> > D-
> > Z6iz_zSDfrd5Va6zLmdoxjv1vLYWQGHDOqYniaXVVHl3Ou2lOUQIjwhSN
> > Ku2aZkYrOb8xMi2cZtfmsv$
> >
> > While that work is ongoing, and most likely won't make v5.20-rc1, for
> > the v5.20-rc1 I think my patches are good to go to avoid a bad (or
> > rather very old) example on how to do GPIO drivers. What do you
> > think?
>
> Just as note, If nothing unexpected happens, I'm planning in sending this
> out today. If you still think this makes sense, fine by me. It's a very minimal
> change that won't give much pain to deal with...

Ah, Okay, I was thinking about a week or two from now. Let's see how
it will go and let Linus decide how to proceed.

-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH v1 3/3] gpio: adp5588: sort header inclusion alphabetically
  2022-06-29 10:33         ` Andy Shevchenko
@ 2022-06-29 10:34           ` Andy Shevchenko
  2022-06-29 10:40           ` Sa, Nuno
  1 sibling, 0 replies; 14+ messages in thread
From: Andy Shevchenko @ 2022-06-29 10:34 UTC (permalink / raw)
  To: Sa, Nuno
  Cc: Hennerich, Michael, Andy Shevchenko, linux-gpio, linux-kernel,
	Linus Walleij, Bartosz Golaszewski

On Wed, Jun 29, 2022 at 12:33 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Wed, Jun 29, 2022 at 12:10 PM Sa, Nuno <Nuno.Sa@analog.com> wrote:
> > > From: Andy Shevchenko <andy.shevchenko@gmail.com>
> > > Sent: Wednesday, June 29, 2022 12:00 PM
> > > On Wed, Jun 29, 2022 at 10:50 AM Hennerich, Michael
> > > <Michael.Hennerich@analog.com> wrote:
> > > > > -----Original Message-----
> > > > > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > > > Sent: Dienstag, 28. Juni 2022 21:39
>
> ...
>
> > > > > Sort header inclusion alphabetically.
> > > >
> > > > Thanks for the patches, they look good.
> > > > However, Nuno is currently working on getting the irqchip support
> > > into the
> > > > adp5588 input driver. In his patch series this driver is going away.
> > > >
> > > > https://urldefense.com/v3/__https://lore.kernel.org/linux-
> > > input/YpMCh1Xje*jsny8j@google.com/__;Kw!!A3Ni8CS0y2Y!_Cb1uAs
> > > D-
> > > Z6iz_zSDfrd5Va6zLmdoxjv1vLYWQGHDOqYniaXVVHl3Ou2lOUQIjwhSN
> > > Ku2aZkYrOb8xMi2cZtfmsv$
> > >
> > > While that work is ongoing, and most likely won't make v5.20-rc1, for
> > > the v5.20-rc1 I think my patches are good to go to avoid a bad (or
> > > rather very old) example on how to do GPIO drivers. What do you
> > > think?
> >
> > Just as note, If nothing unexpected happens, I'm planning in sending this
> > out today. If you still think this makes sense, fine by me. It's a very minimal
> > change that won't give much pain to deal with...
>
> Ah, Okay, I was thinking about a week or two from now. Let's see how
> it will go and let Linus decide how to proceed.

With all respect to Linus, I had to put Bart :-)

-- 
With Best Regards,
Andy Shevchenko

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

* RE: [PATCH v1 3/3] gpio: adp5588: sort header inclusion alphabetically
  2022-06-29 10:33         ` Andy Shevchenko
  2022-06-29 10:34           ` Andy Shevchenko
@ 2022-06-29 10:40           ` Sa, Nuno
  2022-07-06 12:15             ` Andy Shevchenko
  1 sibling, 1 reply; 14+ messages in thread
From: Sa, Nuno @ 2022-06-29 10:40 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Hennerich, Michael, Andy Shevchenko, linux-gpio, linux-kernel,
	Linus Walleij, Bartosz Golaszewski



> -----Original Message-----
> From: Andy Shevchenko <andy.shevchenko@gmail.com>
> Sent: Wednesday, June 29, 2022 12:33 PM
> To: Sa, Nuno <Nuno.Sa@analog.com>
> Cc: Hennerich, Michael <Michael.Hennerich@analog.com>; Andy
> Shevchenko <andriy.shevchenko@linux.intel.com>; linux-
> gpio@vger.kernel.org; linux-kernel@vger.kernel.org; Linus Walleij
> <linus.walleij@linaro.org>; Bartosz Golaszewski <brgl@bgdev.pl>
> Subject: Re: [PATCH v1 3/3] gpio: adp5588: sort header inclusion
> alphabetically
> 
> [External]
> 
> On Wed, Jun 29, 2022 at 12:10 PM Sa, Nuno <Nuno.Sa@analog.com>
> wrote:
> > > From: Andy Shevchenko <andy.shevchenko@gmail.com>
> > > Sent: Wednesday, June 29, 2022 12:00 PM
> > > On Wed, Jun 29, 2022 at 10:50 AM Hennerich, Michael
> > > <Michael.Hennerich@analog.com> wrote:
> > > > > -----Original Message-----
> > > > > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > > > Sent: Dienstag, 28. Juni 2022 21:39
> 
> ...
> 
> > > > > Sort header inclusion alphabetically.
> > > >
> > > > Thanks for the patches, they look good.
> > > > However, Nuno is currently working on getting the irqchip
> support
> > > into the
> > > > adp5588 input driver. In his patch series this driver is going away.
> > > >
> > > > https://urldefense.com/v3/__https://lore.kernel.org/linux-
> > >
> input/YpMCh1Xje*jsny8j@google.com/__;Kw!!A3Ni8CS0y2Y!_Cb1uAs
> > > D-
> > >
> Z6iz_zSDfrd5Va6zLmdoxjv1vLYWQGHDOqYniaXVVHl3Ou2lOUQIjwhSN
> > > Ku2aZkYrOb8xMi2cZtfmsv$
> > >
> > > While that work is ongoing, and most likely won't make v5.20-rc1,
> for
> > > the v5.20-rc1 I think my patches are good to go to avoid a bad (or
> > > rather very old) example on how to do GPIO drivers. What do you
> > > think?
> >
> > Just as note, If nothing unexpected happens, I'm planning in sending
> this
> > out today. If you still think this makes sense, fine by me. It's a very
> minimal
> > change that won't give much pain to deal with...
> 
> Ah, Okay, I was thinking about a week or two from now. Let's see how
> it will go and let Linus decide how to proceed.
> 

Yeah, if it does not happen today, I will only get into it again next
Wednesday (so in this case, might make sense).

- Nuno Sá

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

* Re: [PATCH v1 1/3] gpio: adp5588: Switch from of headers to mod_devicetable.h
  2022-06-28 19:39 [PATCH v1 1/3] gpio: adp5588: Switch from of headers to mod_devicetable.h Andy Shevchenko
  2022-06-28 19:39 ` [PATCH v1 2/3] gpio: adp5588: Do not use defined value for driver name and compatible Andy Shevchenko
  2022-06-28 19:39 ` [PATCH v1 3/3] gpio: adp5588: sort header inclusion alphabetically Andy Shevchenko
@ 2022-06-30 11:57 ` Linus Walleij
  2022-07-06 12:23 ` Bartosz Golaszewski
  3 siblings, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2022-06-30 11:57 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-gpio, linux-kernel, Michael Hennerich, Bartosz Golaszewski

On Tue, Jun 28, 2022 at 9:39 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> There is nothing directly using of specific interfaces in this driver,
> so lets not include the headers.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH v1 2/3] gpio: adp5588: Do not use defined value for driver name and compatible
  2022-06-28 19:39 ` [PATCH v1 2/3] gpio: adp5588: Do not use defined value for driver name and compatible Andy Shevchenko
@ 2022-06-30 11:58   ` Linus Walleij
  0 siblings, 0 replies; 14+ messages in thread
From: Linus Walleij @ 2022-06-30 11:58 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: linux-gpio, linux-kernel, Michael Hennerich, Bartosz Golaszewski

On Tue, Jun 28, 2022 at 9:39 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:

> It's wrong to use defined string literal for three semantically different
> cases, i.e.:
> 1) compatible string, which is part of ABI and has to have specific format;
> 2) I2C ID, which is user space visible and also ABI;
> 3) driver name, that can be changed.
>
> Drop the define and use appropriate string literals in place.
>
> While at it, drop comma at terminator entry of OF ID table.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH v1 3/3] gpio: adp5588: sort header inclusion alphabetically
  2022-06-29 10:40           ` Sa, Nuno
@ 2022-07-06 12:15             ` Andy Shevchenko
  2022-07-06 12:24               ` Bartosz Golaszewski
  0 siblings, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2022-07-06 12:15 UTC (permalink / raw)
  To: Sa, Nuno
  Cc: Hennerich, Michael, linux-gpio, linux-kernel, Linus Walleij,
	Bartosz Golaszewski

On Wed, Jun 29, 2022 at 10:40:00AM +0000, Sa, Nuno wrote:
> > From: Andy Shevchenko <andy.shevchenko@gmail.com>
> > Sent: Wednesday, June 29, 2022 12:33 PM
> > On Wed, Jun 29, 2022 at 12:10 PM Sa, Nuno <Nuno.Sa@analog.com>
> > wrote:

...

> > Ah, Okay, I was thinking about a week or two from now. Let's see how
> > it will go and let Linus decide how to proceed.
> 
> Yeah, if it does not happen today, I will only get into it again next
> Wednesday (so in this case, might make sense).

If I'm not mistaken, that didn't happen.

Bart, can you apply this series then?

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v1 1/3] gpio: adp5588: Switch from of headers to mod_devicetable.h
  2022-06-28 19:39 [PATCH v1 1/3] gpio: adp5588: Switch from of headers to mod_devicetable.h Andy Shevchenko
                   ` (2 preceding siblings ...)
  2022-06-30 11:57 ` [PATCH v1 1/3] gpio: adp5588: Switch from of headers to mod_devicetable.h Linus Walleij
@ 2022-07-06 12:23 ` Bartosz Golaszewski
  3 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2022-07-06 12:23 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: open list:GPIO SUBSYSTEM, Linux Kernel Mailing List,
	Michael Hennerich, Linus Walleij

On Tue, Jun 28, 2022 at 9:39 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> There is nothing directly using of specific interfaces in this driver,
> so lets not include the headers.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/gpio/gpio-adp5588.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpio/gpio-adp5588.c b/drivers/gpio/gpio-adp5588.c
> index e388e75103f4..51ed23ba4645 100644
> --- a/drivers/gpio/gpio-adp5588.c
> +++ b/drivers/gpio/gpio-adp5588.c
> @@ -6,7 +6,6 @@
>   * Copyright 2009-2010 Analog Devices Inc.
>   */
>
> -#include <linux/module.h>
>  #include <linux/kernel.h>
>  #include <linux/slab.h>
>  #include <linux/init.h>
> @@ -14,7 +13,8 @@
>  #include <linux/gpio/driver.h>
>  #include <linux/interrupt.h>
>  #include <linux/irq.h>
> -#include <linux/of_device.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/module.h>
>
>  #include <linux/platform_data/adp5588.h>
>
> @@ -427,18 +427,16 @@ static const struct i2c_device_id adp5588_gpio_id[] = {
>  };
>  MODULE_DEVICE_TABLE(i2c, adp5588_gpio_id);
>
> -#ifdef CONFIG_OF
>  static const struct of_device_id adp5588_gpio_of_id[] = {
>         { .compatible = "adi," DRV_NAME, },
>         {},
>  };
>  MODULE_DEVICE_TABLE(of, adp5588_gpio_of_id);
> -#endif
>
>  static struct i2c_driver adp5588_gpio_driver = {
>         .driver = {
>                 .name = DRV_NAME,
> -               .of_match_table = of_match_ptr(adp5588_gpio_of_id),
> +               .of_match_table = adp5588_gpio_of_id,
>         },
>         .probe_new = adp5588_gpio_probe,
>         .remove = adp5588_gpio_remove,
> --
> 2.35.1
>

Applied all three, thanks!

Bart

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

* Re: [PATCH v1 3/3] gpio: adp5588: sort header inclusion alphabetically
  2022-07-06 12:15             ` Andy Shevchenko
@ 2022-07-06 12:24               ` Bartosz Golaszewski
  0 siblings, 0 replies; 14+ messages in thread
From: Bartosz Golaszewski @ 2022-07-06 12:24 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Sa, Nuno, Hennerich, Michael, linux-gpio, linux-kernel, Linus Walleij

On Wed, Jul 6, 2022 at 2:15 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Wed, Jun 29, 2022 at 10:40:00AM +0000, Sa, Nuno wrote:
> > > From: Andy Shevchenko <andy.shevchenko@gmail.com>
> > > Sent: Wednesday, June 29, 2022 12:33 PM
> > > On Wed, Jun 29, 2022 at 12:10 PM Sa, Nuno <Nuno.Sa@analog.com>
> > > wrote:
>
> ...
>
> > > Ah, Okay, I was thinking about a week or two from now. Let's see how
> > > it will go and let Linus decide how to proceed.
> >
> > Yeah, if it does not happen today, I will only get into it again next
> > Wednesday (so in this case, might make sense).
>
> If I'm not mistaken, that didn't happen.
>
> Bart, can you apply this series then?
>
> --
> With Best Regards,
> Andy Shevchenko
>
>

Now queued.

Bart

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

end of thread, other threads:[~2022-07-06 12:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-28 19:39 [PATCH v1 1/3] gpio: adp5588: Switch from of headers to mod_devicetable.h Andy Shevchenko
2022-06-28 19:39 ` [PATCH v1 2/3] gpio: adp5588: Do not use defined value for driver name and compatible Andy Shevchenko
2022-06-30 11:58   ` Linus Walleij
2022-06-28 19:39 ` [PATCH v1 3/3] gpio: adp5588: sort header inclusion alphabetically Andy Shevchenko
2022-06-29  8:40   ` Hennerich, Michael
2022-06-29  9:59     ` Andy Shevchenko
2022-06-29 10:09       ` Sa, Nuno
2022-06-29 10:33         ` Andy Shevchenko
2022-06-29 10:34           ` Andy Shevchenko
2022-06-29 10:40           ` Sa, Nuno
2022-07-06 12:15             ` Andy Shevchenko
2022-07-06 12:24               ` Bartosz Golaszewski
2022-06-30 11:57 ` [PATCH v1 1/3] gpio: adp5588: Switch from of headers to mod_devicetable.h Linus Walleij
2022-07-06 12:23 ` Bartosz Golaszewski

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.