power: reset: sc27xx: Allow the SC27XX poweroff driver building into a module
authorBaolin Wang <baolin.wang7@gmail.com>
Mon, 9 Mar 2020 08:18:46 +0000 (16:18 +0800)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Wed, 11 Mar 2020 22:32:09 +0000 (23:32 +0100)
Change the config to 'tristate' and use module_platform_driver() to
allow the SC27XX poweroff driver building into a module, as well as
adding some mudule information.

Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/reset/Kconfig
drivers/power/reset/sc27xx-poweroff.c

index 513efe8e762896dbe4b2d3608b53eb3b634a5430..8903803020805c241e567d0d61dae2a456dd1a67 100644 (file)
@@ -248,7 +248,7 @@ config SYSCON_REBOOT_MODE
          action according to the mode.
 
 config POWER_RESET_SC27XX
-       bool "Spreadtrum SC27xx PMIC power-off driver"
+       tristate "Spreadtrum SC27xx PMIC power-off driver"
        depends on MFD_SC27XX_PMIC || COMPILE_TEST
        help
          This driver supports powering off a system through
index 91b5eceeb810b43199eea03e097c591946dbea65..69863074daf6869c331ff32037838c241d2e3a54 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <linux/cpu.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/pm.h>
 #include <linux/regmap.h>
@@ -71,4 +72,8 @@ static struct platform_driver sc27xx_poweroff_driver = {
                .name = "sc27xx-poweroff",
        },
 };
-builtin_platform_driver(sc27xx_poweroff_driver);
+module_platform_driver(sc27xx_poweroff_driver);
+
+MODULE_DESCRIPTION("Power off driver for SC27XX PMIC Device");
+MODULE_AUTHOR("Baolin Wang <baolin.wang@unisoc.com>");
+MODULE_LICENSE("GPL v2");