linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang7@gmail.com>
To: sre@kernel.org
Cc: baolin.wang7@gmail.com, orsonzhai@gmail.com,
	zhang.lyra@gmail.com, kernel-team@android.com,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] power: reset: sc27xx: Allow the SC27XX poweroff driver building into a module
Date: Mon,  9 Mar 2020 16:18:46 +0800	[thread overview]
Message-ID: <12b6c11ec62956173fcd84581720b4e0aed54a11.1583740881.git.baolin.wang7@gmail.com> (raw)
In-Reply-To: <cover.1583740881.git.baolin.wang7@gmail.com>
In-Reply-To: <cover.1583740881.git.baolin.wang7@gmail.com>

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>
---
 drivers/power/reset/Kconfig           | 2 +-
 drivers/power/reset/sc27xx-poweroff.c | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
index 513efe8..8903803 100644
--- a/drivers/power/reset/Kconfig
+++ b/drivers/power/reset/Kconfig
@@ -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
diff --git a/drivers/power/reset/sc27xx-poweroff.c b/drivers/power/reset/sc27xx-poweroff.c
index 91b5ece..6986307 100644
--- a/drivers/power/reset/sc27xx-poweroff.c
+++ b/drivers/power/reset/sc27xx-poweroff.c
@@ -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 int sc27xx_poweroff_probe(struct platform_device *pdev)
 		.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");
-- 
1.9.1


  parent reply	other threads:[~2020-03-09  8:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-09  8:18 [PATCH 0/3] Some optimization for SC27XX poweroff driver Baolin Wang
2020-03-09  8:18 ` [PATCH 1/3] power: reset: sc27xx: Power off the external subsystems' connection Baolin Wang
2020-03-09  8:18 ` [PATCH 2/3] power: reset: sc27xx: Change to use cpu_down() Baolin Wang
2020-03-09  8:18 ` Baolin Wang [this message]
2020-03-11 22:34 ` [PATCH 0/3] Some optimization for SC27XX poweroff driver Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12b6c11ec62956173fcd84581720b4e0aed54a11.1583740881.git.baolin.wang7@gmail.com \
    --to=baolin.wang7@gmail.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=sre@kernel.org \
    --cc=zhang.lyra@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).