linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] reset: berlin: support module build
@ 2021-05-20  9:13 Jisheng Zhang
  2021-06-07  9:23 ` Philipp Zabel
  0 siblings, 1 reply; 7+ messages in thread
From: Jisheng Zhang @ 2021-05-20  9:13 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: linux-kernel

Make reset-berlin driver to be tristate module, support to build as
a module, this is useful for GKI.

Partially revert commit ed4dba99cae8 ("reset: berlin: make it
explicitly non-modular")

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
---
 drivers/reset/Kconfig        |  4 ++--
 drivers/reset/reset-berlin.c | 10 ++++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
index 3e7f55e44d84..1e7443a4dae1 100644
--- a/drivers/reset/Kconfig
+++ b/drivers/reset/Kconfig
@@ -43,8 +43,8 @@ config RESET_BCM6345
 	  This enables the reset controller driver for BCM6345 SoCs.
 
 config RESET_BERLIN
-	bool "Berlin Reset Driver" if COMPILE_TEST
-	default ARCH_BERLIN
+	tristate "Berlin Reset Driver"
+	depends on ARCH_BERLIN || COMPILE_TEST
 	help
 	  This enables the reset controller driver for Marvell Berlin SoCs.
 
diff --git a/drivers/reset/reset-berlin.c b/drivers/reset/reset-berlin.c
index 371197bbd055..72d8ea554d5f 100644
--- a/drivers/reset/reset-berlin.c
+++ b/drivers/reset/reset-berlin.c
@@ -14,7 +14,7 @@
 #include <linux/delay.h>
 #include <linux/io.h>
 #include <linux/mfd/syscon.h>
-#include <linux/init.h>
+#include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/platform_device.h>
@@ -93,6 +93,7 @@ static const struct of_device_id berlin_reset_dt_match[] = {
 	{ .compatible = "marvell,berlin2-reset" },
 	{ },
 };
+MODULE_DEVICE_TABLE(of, berlin_reset_dt_match);
 
 static struct platform_driver berlin_reset_driver = {
 	.probe	= berlin2_reset_probe,
@@ -101,4 +102,9 @@ static struct platform_driver berlin_reset_driver = {
 		.of_match_table = berlin_reset_dt_match,
 	},
 };
-builtin_platform_driver(berlin_reset_driver);
+module_platform_driver(berlin_reset_driver);
+
+MODULE_AUTHOR("Antoine Tenart <antoine.tenart@free-electrons.com>");
+MODULE_AUTHOR("Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>");
+MODULE_DESCRIPTION("Synaptics Berlin reset controller");
+MODULE_LICENSE("GPL");
-- 
2.31.0


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

* Re: [PATCH] reset: berlin: support module build
  2021-05-20  9:13 [PATCH] reset: berlin: support module build Jisheng Zhang
@ 2021-06-07  9:23 ` Philipp Zabel
  2021-06-07  9:44   ` Jisheng Zhang
  0 siblings, 1 reply; 7+ messages in thread
From: Philipp Zabel @ 2021-06-07  9:23 UTC (permalink / raw)
  To: Jisheng Zhang; +Cc: linux-kernel

On Thu, 2021-05-20 at 17:13 +0800, Jisheng Zhang wrote:
> Make reset-berlin driver to be tristate module, support to build as
> a module, this is useful for GKI.
> 
> Partially revert commit ed4dba99cae8 ("reset: berlin: make it
> explicitly non-modular")
> 
> Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> ---
>  drivers/reset/Kconfig        |  4 ++--
>  drivers/reset/reset-berlin.c | 10 ++++++++--
>  2 files changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> index 3e7f55e44d84..1e7443a4dae1 100644
> --- a/drivers/reset/Kconfig
> +++ b/drivers/reset/Kconfig
> @@ -43,8 +43,8 @@ config RESET_BCM6345
>  	  This enables the reset controller driver for BCM6345 SoCs.
>  
>  config RESET_BERLIN
> -	bool "Berlin Reset Driver" if COMPILE_TEST
> -	default ARCH_BERLIN
> +	tristate "Berlin Reset Driver"
> +	depends on ARCH_BERLIN || COMPILE_TEST

Is there a reason not to keep "default ARCH_BERLIN"?

regards
Philipp

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

* Re: [PATCH] reset: berlin: support module build
  2021-06-07  9:23 ` Philipp Zabel
@ 2021-06-07  9:44   ` Jisheng Zhang
  2021-06-07  9:49     ` Philipp Zabel
  0 siblings, 1 reply; 7+ messages in thread
From: Jisheng Zhang @ 2021-06-07  9:44 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: linux-kernel

On Mon, 07 Jun 2021 11:23:57 +0200
Philipp Zabel <p.zabel@pengutronix.de> wrote:


> 
> 
> On Thu, 2021-05-20 at 17:13 +0800, Jisheng Zhang wrote:
> > Make reset-berlin driver to be tristate module, support to build as
> > a module, this is useful for GKI.
> >
> > Partially revert commit ed4dba99cae8 ("reset: berlin: make it
> > explicitly non-modular")
> >
> > Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> > ---
> >  drivers/reset/Kconfig        |  4 ++--
> >  drivers/reset/reset-berlin.c | 10 ++++++++--
> >  2 files changed, 10 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> > index 3e7f55e44d84..1e7443a4dae1 100644
> > --- a/drivers/reset/Kconfig
> > +++ b/drivers/reset/Kconfig
> > @@ -43,8 +43,8 @@ config RESET_BCM6345
> >         This enables the reset controller driver for BCM6345 SoCs.
> >
> >  config RESET_BERLIN
> > -     bool "Berlin Reset Driver" if COMPILE_TEST
> > -     default ARCH_BERLIN
> > +     tristate "Berlin Reset Driver"
> > +     depends on ARCH_BERLIN || COMPILE_TEST  
> 
> Is there a reason not to keep "default ARCH_BERLIN"?
> 

Hi,

After this patch, the reset driver will be built as module in most cases
so I removed default ARCH_BERLIN

Thanks

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

* Re: [PATCH] reset: berlin: support module build
  2021-06-07  9:44   ` Jisheng Zhang
@ 2021-06-07  9:49     ` Philipp Zabel
  2021-06-07  9:56       ` Jisheng Zhang
  0 siblings, 1 reply; 7+ messages in thread
From: Philipp Zabel @ 2021-06-07  9:49 UTC (permalink / raw)
  To: Jisheng Zhang; +Cc: linux-kernel

On Mon, 2021-06-07 at 17:44 +0800, Jisheng Zhang wrote:
> On Mon, 07 Jun 2021 11:23:57 +0200
> Philipp Zabel <p.zabel@pengutronix.de> wrote:
> 
> 
> > 
> > On Thu, 2021-05-20 at 17:13 +0800, Jisheng Zhang wrote:
> > > Make reset-berlin driver to be tristate module, support to build as
> > > a module, this is useful for GKI.
> > > 
> > > Partially revert commit ed4dba99cae8 ("reset: berlin: make it
> > > explicitly non-modular")
> > > 
> > > Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> > > ---
> > >  drivers/reset/Kconfig        |  4 ++--
> > >  drivers/reset/reset-berlin.c | 10 ++++++++--
> > >  2 files changed, 10 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> > > index 3e7f55e44d84..1e7443a4dae1 100644
> > > --- a/drivers/reset/Kconfig
> > > +++ b/drivers/reset/Kconfig
> > > @@ -43,8 +43,8 @@ config RESET_BCM6345
> > >         This enables the reset controller driver for BCM6345 SoCs.
> > > 
> > >  config RESET_BERLIN
> > > -     bool "Berlin Reset Driver" if COMPILE_TEST
> > > -     default ARCH_BERLIN
> > > +     tristate "Berlin Reset Driver"
> > > +     depends on ARCH_BERLIN || COMPILE_TEST  
> > 
> > Is there a reason not to keep "default ARCH_BERLIN"?
> > 
> 
> Hi,
> 
> After this patch, the reset driver will be built as module in most cases
> so I removed default ARCH_BERLIN

I see, how about "default m if ARCH_BERLIN" then?

I'd just like to avoid anybody getting surprised by a suddenly
deactivated reset controller driver.

regards
Philipp

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

* Re: [PATCH] reset: berlin: support module build
  2021-06-07  9:49     ` Philipp Zabel
@ 2021-06-07  9:56       ` Jisheng Zhang
  2021-06-07 10:01         ` Philipp Zabel
  0 siblings, 1 reply; 7+ messages in thread
From: Jisheng Zhang @ 2021-06-07  9:56 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: linux-kernel

On Mon, 07 Jun 2021 11:49:45 +0200
Philipp Zabel <p.zabel@pengutronix.de> wrote:


> 
> 
> On Mon, 2021-06-07 at 17:44 +0800, Jisheng Zhang wrote:
> > On Mon, 07 Jun 2021 11:23:57 +0200
> > Philipp Zabel <p.zabel@pengutronix.de> wrote:
> >
> >  
> > >
> > > On Thu, 2021-05-20 at 17:13 +0800, Jisheng Zhang wrote:  
> > > > Make reset-berlin driver to be tristate module, support to build as
> > > > a module, this is useful for GKI.
> > > >
> > > > Partially revert commit ed4dba99cae8 ("reset: berlin: make it
> > > > explicitly non-modular")
> > > >
> > > > Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> > > > ---
> > > >  drivers/reset/Kconfig        |  4 ++--
> > > >  drivers/reset/reset-berlin.c | 10 ++++++++--
> > > >  2 files changed, 10 insertions(+), 4 deletions(-)
> > > >
> > > > diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> > > > index 3e7f55e44d84..1e7443a4dae1 100644
> > > > --- a/drivers/reset/Kconfig
> > > > +++ b/drivers/reset/Kconfig
> > > > @@ -43,8 +43,8 @@ config RESET_BCM6345
> > > >         This enables the reset controller driver for BCM6345 SoCs.
> > > >
> > > >  config RESET_BERLIN
> > > > -     bool "Berlin Reset Driver" if COMPILE_TEST
> > > > -     default ARCH_BERLIN
> > > > +     tristate "Berlin Reset Driver"
> > > > +     depends on ARCH_BERLIN || COMPILE_TEST  
> > >
> > > Is there a reason not to keep "default ARCH_BERLIN"?
> > >  
> >
> > Hi,
> >
> > After this patch, the reset driver will be built as module in most cases
> > so I removed default ARCH_BERLIN  
> 
> I see, how about "default m if ARCH_BERLIN" then?

Good idea. I think "default m" is enough, because we have a "depends on
ARCH_BERLIN || COMPILE_TEST" above

Will send out v2 soon

Thanks

> 
> I'd just like to avoid anybody getting surprised by a suddenly
> deactivated reset controller driver.
> 
> regards
> Philipp


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

* Re: [PATCH] reset: berlin: support module build
  2021-06-07  9:56       ` Jisheng Zhang
@ 2021-06-07 10:01         ` Philipp Zabel
  2021-06-07 10:13           ` Jisheng Zhang
  0 siblings, 1 reply; 7+ messages in thread
From: Philipp Zabel @ 2021-06-07 10:01 UTC (permalink / raw)
  To: Jisheng Zhang; +Cc: linux-kernel

On Mon, 2021-06-07 at 17:56 +0800, Jisheng Zhang wrote:
> On Mon, 07 Jun 2021 11:49:45 +0200
> Philipp Zabel <p.zabel@pengutronix.de> wrote:
> 
> 
> > 
> > On Mon, 2021-06-07 at 17:44 +0800, Jisheng Zhang wrote:
> > > On Mon, 07 Jun 2021 11:23:57 +0200
> > > Philipp Zabel <p.zabel@pengutronix.de> wrote:
> > > 
> > >  
> > > > On Thu, 2021-05-20 at 17:13 +0800, Jisheng Zhang wrote:  
> > > > > Make reset-berlin driver to be tristate module, support to build as
> > > > > a module, this is useful for GKI.
> > > > > 
> > > > > Partially revert commit ed4dba99cae8 ("reset: berlin: make it
> > > > > explicitly non-modular")
> > > > > 
> > > > > Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> > > > > ---
> > > > >  drivers/reset/Kconfig        |  4 ++--
> > > > >  drivers/reset/reset-berlin.c | 10 ++++++++--
> > > > >  2 files changed, 10 insertions(+), 4 deletions(-)
> > > > > 
> > > > > diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> > > > > index 3e7f55e44d84..1e7443a4dae1 100644
> > > > > --- a/drivers/reset/Kconfig
> > > > > +++ b/drivers/reset/Kconfig
> > > > > @@ -43,8 +43,8 @@ config RESET_BCM6345
> > > > >         This enables the reset controller driver for BCM6345 SoCs.
> > > > > 
> > > > >  config RESET_BERLIN
> > > > > -     bool "Berlin Reset Driver" if COMPILE_TEST
> > > > > -     default ARCH_BERLIN
> > > > > +     tristate "Berlin Reset Driver"
> > > > > +     depends on ARCH_BERLIN || COMPILE_TEST  
> > > > 
> > > > Is there a reason not to keep "default ARCH_BERLIN"?
> > > >  
> > > 
> > > Hi,
> > > 
> > > After this patch, the reset driver will be built as module in most cases
> > > so I removed default ARCH_BERLIN  
> > 
> > I see, how about "default m if ARCH_BERLIN" then?
> 
> Good idea. I think "default m" is enough, because we have a "depends on
> ARCH_BERLIN || COMPILE_TEST" above

"default m" would also enable the module for COMPILE_TEST by default,
which may not be what most compile testers need.

regards
Philipp

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

* Re: [PATCH] reset: berlin: support module build
  2021-06-07 10:01         ` Philipp Zabel
@ 2021-06-07 10:13           ` Jisheng Zhang
  0 siblings, 0 replies; 7+ messages in thread
From: Jisheng Zhang @ 2021-06-07 10:13 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: linux-kernel

On Mon, 07 Jun 2021 12:01:00 +0200
Philipp Zabel <p.zabel@pengutronix.de> wrote:


> 
> 
> On Mon, 2021-06-07 at 17:56 +0800, Jisheng Zhang wrote:
> > On Mon, 07 Jun 2021 11:49:45 +0200
> > Philipp Zabel <p.zabel@pengutronix.de> wrote:
> >
> >  
> > >
> > > On Mon, 2021-06-07 at 17:44 +0800, Jisheng Zhang wrote:  
> > > > On Mon, 07 Jun 2021 11:23:57 +0200
> > > > Philipp Zabel <p.zabel@pengutronix.de> wrote:
> > > >
> > > >  
> > > > > On Thu, 2021-05-20 at 17:13 +0800, Jisheng Zhang wrote:  
> > > > > > Make reset-berlin driver to be tristate module, support to build as
> > > > > > a module, this is useful for GKI.
> > > > > >
> > > > > > Partially revert commit ed4dba99cae8 ("reset: berlin: make it
> > > > > > explicitly non-modular")
> > > > > >
> > > > > > Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> > > > > > ---
> > > > > >  drivers/reset/Kconfig        |  4 ++--
> > > > > >  drivers/reset/reset-berlin.c | 10 ++++++++--
> > > > > >  2 files changed, 10 insertions(+), 4 deletions(-)
> > > > > >
> > > > > > diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> > > > > > index 3e7f55e44d84..1e7443a4dae1 100644
> > > > > > --- a/drivers/reset/Kconfig
> > > > > > +++ b/drivers/reset/Kconfig
> > > > > > @@ -43,8 +43,8 @@ config RESET_BCM6345
> > > > > >         This enables the reset controller driver for BCM6345 SoCs.
> > > > > >
> > > > > >  config RESET_BERLIN
> > > > > > -     bool "Berlin Reset Driver" if COMPILE_TEST
> > > > > > -     default ARCH_BERLIN
> > > > > > +     tristate "Berlin Reset Driver"
> > > > > > +     depends on ARCH_BERLIN || COMPILE_TEST  
> > > > >
> > > > > Is there a reason not to keep "default ARCH_BERLIN"?
> > > > >  
> > > >
> > > > Hi,
> > > >
> > > > After this patch, the reset driver will be built as module in most cases
> > > > so I removed default ARCH_BERLIN  
> > >
> > > I see, how about "default m if ARCH_BERLIN" then?  
> >
> > Good idea. I think "default m" is enough, because we have a "depends on
> > ARCH_BERLIN || COMPILE_TEST" above  
> 
> "default m" would also enable the module for COMPILE_TEST by default,
> which may not be what most compile testers need.
> 

Thanks for the suggestion. V2 is sent out

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

end of thread, other threads:[~2021-06-07 10:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20  9:13 [PATCH] reset: berlin: support module build Jisheng Zhang
2021-06-07  9:23 ` Philipp Zabel
2021-06-07  9:44   ` Jisheng Zhang
2021-06-07  9:49     ` Philipp Zabel
2021-06-07  9:56       ` Jisheng Zhang
2021-06-07 10:01         ` Philipp Zabel
2021-06-07 10:13           ` Jisheng Zhang

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).