X86 platform drivers
 help / color / mirror / Atom feed
* [PATCH v2] gpio: tps68470: Allow building as module
@ 2022-01-11 10:56 Hans de Goede
  2022-01-11 11:31 ` Andy Shevchenko
  2022-01-11 12:06 ` Andy Shevchenko
  0 siblings, 2 replies; 7+ messages in thread
From: Hans de Goede @ 2022-01-11 10:56 UTC (permalink / raw)
  To: Andy Shevchenko, Bartosz Golaszewski, Linus Walleij
  Cc: Hans de Goede, platform-driver-x86, linux-gpio, Andy Shevchenko

The gpio-tps68470 driver binds to a tps68470-gpio platform-device which
itself gets instantiated by a special MFD driver from
drivers/platform/x86/intel/int3472/tps68470.c

This MFD driver itself can be built as a module, so it makes no sense to
force the gpio-tps68470 driver to always be built-in.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Changes in v2:
- Fix some spelling errors in the commit msg
- Remove blank line between tps68470_gpio_driver decleration and
  module_platform_driver(tps68470_gpio_driver)
---
 drivers/gpio/Kconfig         | 6 +-----
 drivers/gpio/gpio-tps68470.c | 5 ++++-
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 60d9374c72c0..3ac5860e0aeb 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -1393,7 +1393,7 @@ config GPIO_TPS65912
 	  This driver supports TPS65912 GPIO chip.
 
 config GPIO_TPS68470
-	bool "TPS68470 GPIO"
+	tristate "TPS68470 GPIO"
 	depends on INTEL_SKL_INT3472
 	help
 	  Select this option to enable GPIO driver for the TPS68470
@@ -1403,10 +1403,6 @@ config GPIO_TPS68470
 	  input or output as appropriate, the sensor related GPIOs
 	  are "output only" GPIOs.
 
-	  This driver config is bool, as the GPIO functionality
-	  of the TPS68470 must be available before dependent
-	  drivers are loaded.
-
 config GPIO_TQMX86
 	tristate "TQ-Systems QTMX86 GPIO"
 	depends on MFD_TQMX86 || COMPILE_TEST
diff --git a/drivers/gpio/gpio-tps68470.c b/drivers/gpio/gpio-tps68470.c
index 423b7bc30ae8..aaddcabe9b35 100644
--- a/drivers/gpio/gpio-tps68470.c
+++ b/drivers/gpio/gpio-tps68470.c
@@ -154,5 +154,8 @@ static struct platform_driver tps68470_gpio_driver = {
 	},
 	.probe = tps68470_gpio_probe,
 };
+module_platform_driver(tps68470_gpio_driver);
 
-builtin_platform_driver(tps68470_gpio_driver)
+MODULE_ALIAS("platform:tps68470-gpio");
+MODULE_DESCRIPTION("GPIO driver for TPS68470 PMIC");
+MODULE_LICENSE("GPL v2");
-- 
2.33.1


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

* Re: [PATCH v2] gpio: tps68470: Allow building as module
  2022-01-11 10:56 [PATCH v2] gpio: tps68470: Allow building as module Hans de Goede
@ 2022-01-11 11:31 ` Andy Shevchenko
  2022-01-11 11:46   ` Hans de Goede
  2022-01-11 12:06 ` Andy Shevchenko
  1 sibling, 1 reply; 7+ messages in thread
From: Andy Shevchenko @ 2022-01-11 11:31 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Andy Shevchenko, Bartosz Golaszewski, Linus Walleij,
	platform-driver-x86, linux-gpio

On Tue, Jan 11, 2022 at 11:56:32AM +0100, Hans de Goede wrote:
> The gpio-tps68470 driver binds to a tps68470-gpio platform-device which
> itself gets instantiated by a special MFD driver from
> drivers/platform/x86/intel/int3472/tps68470.c
> 
> This MFD driver itself can be built as a module, so it makes no sense to
> force the gpio-tps68470 driver to always be built-in.
> 
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

> Changes in v2:
> - Fix some spelling errors in the commit msg
> - Remove blank line between tps68470_gpio_driver decleration and
>   module_platform_driver(tps68470_gpio_driver)

It used to be 2 patches in the series, are you going to send another one
separately?

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v2] gpio: tps68470: Allow building as module
  2022-01-11 11:31 ` Andy Shevchenko
@ 2022-01-11 11:46   ` Hans de Goede
  2022-01-11 12:02     ` Andy Shevchenko
  0 siblings, 1 reply; 7+ messages in thread
From: Hans de Goede @ 2022-01-11 11:46 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Andy Shevchenko, Bartosz Golaszewski, Linus Walleij,
	platform-driver-x86, linux-gpio

Hi,

On 1/11/22 12:31, Andy Shevchenko wrote:
> On Tue, Jan 11, 2022 at 11:56:32AM +0100, Hans de Goede wrote:
>> The gpio-tps68470 driver binds to a tps68470-gpio platform-device which
>> itself gets instantiated by a special MFD driver from
>> drivers/platform/x86/intel/int3472/tps68470.c
>>
>> This MFD driver itself can be built as a module, so it makes no sense to
>> force the gpio-tps68470 driver to always be built-in.
>>
>> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> 
>> Changes in v2:
>> - Fix some spelling errors in the commit msg
>> - Remove blank line between tps68470_gpio_driver decleration and
>>   module_platform_driver(tps68470_gpio_driver)
> 
> It used to be 2 patches in the series, are you going to send another one
> separately?

Ah right, I forgot this was a series. The other one had no review comments,
so v1 is still valid, you can find it here:

https://lore.kernel.org/linux-gpio/20211225120026.95268-2-hdegoede@redhat.com/

Regards,

Hans



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

* Re: [PATCH v2] gpio: tps68470: Allow building as module
  2022-01-11 11:46   ` Hans de Goede
@ 2022-01-11 12:02     ` Andy Shevchenko
  2022-01-11 12:03       ` Andy Shevchenko
  2022-01-11 12:13       ` Hans de Goede
  0 siblings, 2 replies; 7+ messages in thread
From: Andy Shevchenko @ 2022-01-11 12:02 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Andy Shevchenko, Bartosz Golaszewski, Linus Walleij,
	platform-driver-x86, linux-gpio

On Tue, Jan 11, 2022 at 12:46:16PM +0100, Hans de Goede wrote:
> On 1/11/22 12:31, Andy Shevchenko wrote:
> > On Tue, Jan 11, 2022 at 11:56:32AM +0100, Hans de Goede wrote:

...

> > It used to be 2 patches in the series, are you going to send another one
> > separately?
> 
> Ah right, I forgot this was a series. The other one had no review comments,
> so v1 is still valid, you can find it here:
> 
> https://lore.kernel.org/linux-gpio/20211225120026.95268-2-hdegoede@redhat.com/

Okay (but in the future it's better to send a new complete version, it's easier
for `b4` tool to handle).

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v2] gpio: tps68470: Allow building as module
  2022-01-11 12:02     ` Andy Shevchenko
@ 2022-01-11 12:03       ` Andy Shevchenko
  2022-01-11 12:13       ` Hans de Goede
  1 sibling, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2022-01-11 12:03 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Andy Shevchenko, Bartosz Golaszewski, Linus Walleij,
	platform-driver-x86, linux-gpio

On Tue, Jan 11, 2022 at 02:02:37PM +0200, Andy Shevchenko wrote:
> On Tue, Jan 11, 2022 at 12:46:16PM +0100, Hans de Goede wrote:
> > On 1/11/22 12:31, Andy Shevchenko wrote:
> > > On Tue, Jan 11, 2022 at 11:56:32AM +0100, Hans de Goede wrote:
> 
> ...
> 
> > > It used to be 2 patches in the series, are you going to send another one
> > > separately?
> > 
> > Ah right, I forgot this was a series. The other one had no review comments,
> > so v1 is still valid, you can find it here:
> > 
> > https://lore.kernel.org/linux-gpio/20211225120026.95268-2-hdegoede@redhat.com/
> 
> Okay (but in the future it's better to send a new complete version, it's easier
> for `b4` tool to handle).

No need to resend, I will handle this now.

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v2] gpio: tps68470: Allow building as module
  2022-01-11 10:56 [PATCH v2] gpio: tps68470: Allow building as module Hans de Goede
  2022-01-11 11:31 ` Andy Shevchenko
@ 2022-01-11 12:06 ` Andy Shevchenko
  1 sibling, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2022-01-11 12:06 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Andy Shevchenko, Bartosz Golaszewski, Linus Walleij,
	platform-driver-x86, linux-gpio

On Tue, Jan 11, 2022 at 11:56:32AM +0100, Hans de Goede wrote:
> The gpio-tps68470 driver binds to a tps68470-gpio platform-device which
> itself gets instantiated by a special MFD driver from
> drivers/platform/x86/intel/int3472/tps68470.c
> 
> This MFD driver itself can be built as a module, so it makes no sense to
> force the gpio-tps68470 driver to always be built-in.

Pushed (along with patch 2/2 from v1) to my review and testing queue, thanks!

> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> Changes in v2:
> - Fix some spelling errors in the commit msg
> - Remove blank line between tps68470_gpio_driver decleration and
>   module_platform_driver(tps68470_gpio_driver)
> ---
>  drivers/gpio/Kconfig         | 6 +-----
>  drivers/gpio/gpio-tps68470.c | 5 ++++-
>  2 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> index 60d9374c72c0..3ac5860e0aeb 100644
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -1393,7 +1393,7 @@ config GPIO_TPS65912
>  	  This driver supports TPS65912 GPIO chip.
>  
>  config GPIO_TPS68470
> -	bool "TPS68470 GPIO"
> +	tristate "TPS68470 GPIO"
>  	depends on INTEL_SKL_INT3472
>  	help
>  	  Select this option to enable GPIO driver for the TPS68470
> @@ -1403,10 +1403,6 @@ config GPIO_TPS68470
>  	  input or output as appropriate, the sensor related GPIOs
>  	  are "output only" GPIOs.
>  
> -	  This driver config is bool, as the GPIO functionality
> -	  of the TPS68470 must be available before dependent
> -	  drivers are loaded.
> -
>  config GPIO_TQMX86
>  	tristate "TQ-Systems QTMX86 GPIO"
>  	depends on MFD_TQMX86 || COMPILE_TEST
> diff --git a/drivers/gpio/gpio-tps68470.c b/drivers/gpio/gpio-tps68470.c
> index 423b7bc30ae8..aaddcabe9b35 100644
> --- a/drivers/gpio/gpio-tps68470.c
> +++ b/drivers/gpio/gpio-tps68470.c
> @@ -154,5 +154,8 @@ static struct platform_driver tps68470_gpio_driver = {
>  	},
>  	.probe = tps68470_gpio_probe,
>  };
> +module_platform_driver(tps68470_gpio_driver);
>  
> -builtin_platform_driver(tps68470_gpio_driver)
> +MODULE_ALIAS("platform:tps68470-gpio");
> +MODULE_DESCRIPTION("GPIO driver for TPS68470 PMIC");
> +MODULE_LICENSE("GPL v2");
> -- 
> 2.33.1
> 

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v2] gpio: tps68470: Allow building as module
  2022-01-11 12:02     ` Andy Shevchenko
  2022-01-11 12:03       ` Andy Shevchenko
@ 2022-01-11 12:13       ` Hans de Goede
  1 sibling, 0 replies; 7+ messages in thread
From: Hans de Goede @ 2022-01-11 12:13 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Andy Shevchenko, Bartosz Golaszewski, Linus Walleij,
	platform-driver-x86, linux-gpio

Hi,

On 1/11/22 13:02, Andy Shevchenko wrote:
> On Tue, Jan 11, 2022 at 12:46:16PM +0100, Hans de Goede wrote:
>> On 1/11/22 12:31, Andy Shevchenko wrote:
>>> On Tue, Jan 11, 2022 at 11:56:32AM +0100, Hans de Goede wrote:
> 
> ...
> 
>>> It used to be 2 patches in the series, are you going to send another one
>>> separately?
>>
>> Ah right, I forgot this was a series. The other one had no review comments,
>> so v1 is still valid, you can find it here:
>>
>> https://lore.kernel.org/linux-gpio/20211225120026.95268-2-hdegoede@redhat.com/
> 
> Okay (but in the future it's better to send a new complete version, it's easier
> for `b4` tool to handle).

Ack, as I said I forgot this was part of a series, otherwise
I would have done a v2 for the entire series.

Regards,

Hans


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

end of thread, other threads:[~2022-01-11 12:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-11 10:56 [PATCH v2] gpio: tps68470: Allow building as module Hans de Goede
2022-01-11 11:31 ` Andy Shevchenko
2022-01-11 11:46   ` Hans de Goede
2022-01-11 12:02     ` Andy Shevchenko
2022-01-11 12:03       ` Andy Shevchenko
2022-01-11 12:13       ` Hans de Goede
2022-01-11 12:06 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox