Skip to contentSkip to conversation

reset: berlin: support module build

PATCH Superseded Jisheng Zhang 2 participants 7 messages May 20, 2021 – Jun 7, 2021 Reset controller framework

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reset: berlin: support module build

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

---
 drivers/reset/Kconfig        |  4 ++--
 drivers/reset/reset-berlin.c | 10 ++++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/reset/Kconfig +2 -2
index 3e7f55e44d84..1e7443a4dae1 100644
@@ -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.
 
drivers/reset/reset-berlin.c +8 -2
index 371197bbd055..72d8ea554d5f 100644
@@ -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 <[email protected]>");
+MODULE_AUTHOR("Sebastian Hesselbarth <[email protected]>");
+MODULE_DESCRIPTION("Synaptics Berlin reset controller");
+MODULE_LICENSE("GPL");
Signature · 1 line
2.31.0
maintainer
#1 lore raw
Quoted 17 lines · Jisheng Zhang

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

---
 drivers/reset/Kconfig        |  4 ++--
 drivers/reset/reset-berlin.c | 10 ++++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/reset/Kconfig +0 -0
index 3e7f55e44d84..1e7443a4dae1 100644

drivers/reset/Kconfig config RESET_BCM6345 · line 47

Quoted 7 lines
drivers/reset/Kconfig +2 -2
@@ -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

#2 lore raw
Quoted 22 lines · On Mon, 07 Jun 2021 11:23:57 +0200 Philipp Zabel <[email protected]> wrote:
Quoted 19 lines · Jisheng Zhang

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

---
 drivers/reset/Kconfig        |  4 ++--
 drivers/reset/reset-berlin.c | 10 ++++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/reset/Kconfig +0 -0
index 3e7f55e44d84..1e7443a4dae1 100644
@@ -43,8 +43,8 @@ config RESET_BCM6345
        This enables the reset controller driver for BCM6345 SoCs.
 
Quoted 8 lines

drivers/reset/Kconfig config RESET_BCM6345 · line 47

Quoted 5 lines
drivers/reset/Kconfig +2 -2
 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

maintainer
#3 lore raw
Quoted 34 lines · Jisheng Zhang
Quoted 21 lines · On Mon, 07 Jun 2021 11:23:57 +0200 Philipp Zabel <[email protected]> wrote:
Quoted 19 lines · Jisheng Zhang

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

---
 drivers/reset/Kconfig        |  4 ++--
 drivers/reset/reset-berlin.c | 10 ++++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/reset/Kconfig +0 -0
index 3e7f55e44d84..1e7443a4dae1 100644
@@ -43,8 +43,8 @@ config RESET_BCM6345
        This enables the reset controller driver for BCM6345 SoCs.
 
Quoted 8 lines

drivers/reset/Kconfig config RESET_BCM6345 · line 47

Quoted 5 lines
drivers/reset/Kconfig +2 -2
 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"?

Quoted 4 lines

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

#4 lore raw
Quoted 37 lines · On Mon, 07 Jun 2021 11:49:45 +0200 Philipp Zabel <[email protected]> wrote:
Quoted 34 lines · Jisheng Zhang
Quoted 29 lines · On Mon, 07 Jun 2021 11:23:57 +0200 Philipp Zabel <[email protected]> wrote:
Quoted 17 lines · Jisheng Zhang

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

---
 drivers/reset/Kconfig        |  4 ++--
 drivers/reset/reset-berlin.c | 10 ++++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/reset/Kconfig +0 -0
index 3e7f55e44d84..1e7443a4dae1 100644

drivers/reset/Kconfig config RESET_BCM6345 · line 47

Quoted 7 lines
drivers/reset/Kconfig +2 -2
@@ -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"?

Quoted 6 lines
Quoted 4 lines

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

Quoted 6 lines

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

regards
Philipp

maintainer
#5 lore raw
Quoted 41 lines · Jisheng Zhang
Quoted 37 lines · On Mon, 07 Jun 2021 11:49:45 +0200 Philipp Zabel <[email protected]> wrote:
Quoted 35 lines · Jisheng Zhang
Quoted 20 lines · On Mon, 07 Jun 2021 11:23:57 +0200 Philipp Zabel <[email protected]> wrote:
Quoted 19 lines · Jisheng Zhang

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

---
 drivers/reset/Kconfig        |  4 ++--
 drivers/reset/reset-berlin.c | 10 ++++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/reset/Kconfig +0 -0
index 3e7f55e44d84..1e7443a4dae1 100644
@@ -43,8 +43,8 @@ config RESET_BCM6345
        This enables the reset controller driver for BCM6345 SoCs.
 
Quoted 8 lines

drivers/reset/Kconfig config RESET_BCM6345 · line 47

Quoted 5 lines
drivers/reset/Kconfig +2 -2
 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,

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

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

#6 lore raw
Quoted 47 lines · On Mon, 07 Jun 2021 12:01:00 +0200 Philipp Zabel <[email protected]> wrote:
Quoted 44 lines · Jisheng Zhang
Quoted 40 lines · On Mon, 07 Jun 2021 11:49:45 +0200 Philipp Zabel <[email protected]> wrote:
Quoted 37 lines · Jisheng Zhang
Quoted 20 lines · On Mon, 07 Jun 2021 11:23:57 +0200 Philipp Zabel <[email protected]> wrote:
Quoted 19 lines · Jisheng Zhang

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

---
 drivers/reset/Kconfig        |  4 ++--
 drivers/reset/reset-berlin.c | 10 ++++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/reset/Kconfig +0 -0
index 3e7f55e44d84..1e7443a4dae1 100644
@@ -43,8 +43,8 @@ config RESET_BCM6345
        This enables the reset controller driver for BCM6345 SoCs.
 
Quoted 8 lines

drivers/reset/Kconfig config RESET_BCM6345 · line 47

Quoted 5 lines
drivers/reset/Kconfig +2 -2
 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

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

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