Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 reverts commit ed4dba99cae8 ("reset: berlin: make it
explicitly non-modular")

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Link: https://lore.kernel.org/r/20210607181015.5b8d3711@xhacker.debian
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

authored by

Jisheng Zhang and committed by
Philipp Zabel
5e787cdf 4fb26fb8

+11 -4
+3 -2
drivers/reset/Kconfig
··· 43 43 This enables the reset controller driver for BCM6345 SoCs. 44 44 45 45 config RESET_BERLIN 46 - bool "Berlin Reset Driver" if COMPILE_TEST 47 - default ARCH_BERLIN 46 + tristate "Berlin Reset Driver" 47 + depends on ARCH_BERLIN || COMPILE_TEST 48 + default m if ARCH_BERLIN 48 49 help 49 50 This enables the reset controller driver for Marvell Berlin SoCs. 50 51
+8 -2
drivers/reset/reset-berlin.c
··· 14 14 #include <linux/delay.h> 15 15 #include <linux/io.h> 16 16 #include <linux/mfd/syscon.h> 17 - #include <linux/init.h> 17 + #include <linux/module.h> 18 18 #include <linux/of.h> 19 19 #include <linux/of_address.h> 20 20 #include <linux/platform_device.h> ··· 93 93 { .compatible = "marvell,berlin2-reset" }, 94 94 { }, 95 95 }; 96 + MODULE_DEVICE_TABLE(of, berlin_reset_dt_match); 96 97 97 98 static struct platform_driver berlin_reset_driver = { 98 99 .probe = berlin2_reset_probe, ··· 102 101 .of_match_table = berlin_reset_dt_match, 103 102 }, 104 103 }; 105 - builtin_platform_driver(berlin_reset_driver); 104 + module_platform_driver(berlin_reset_driver); 105 + 106 + MODULE_AUTHOR("Antoine Tenart <antoine.tenart@free-electrons.com>"); 107 + MODULE_AUTHOR("Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>"); 108 + MODULE_DESCRIPTION("Synaptics Berlin reset controller"); 109 + MODULE_LICENSE("GPL");