linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] reset: qcom-aoss: Allow CONFIG_RESET_QCOM_AOSS to be a tristate
@ 2020-01-08  0:19 John Stultz
  2020-01-08  0:23 ` Bjorn Andersson
  0 siblings, 1 reply; 3+ messages in thread
From: John Stultz @ 2020-01-08  0:19 UTC (permalink / raw)
  To: lkml
  Cc: John Stultz, Todd Kjos, Alistair Delva, Bjorn Andersson,
	Amit Pundir, Philipp Zabel

Allow CONFIG_RESET_QCOM_AOSS to be set as as =m to allow for the
driver to be loaded from a modules.

Also replaces the builtin_platform_driver() line with
module_platform_driver() and adds a MODULE_DEVICE_TABLE() entry.

Cc: Todd Kjos <tkjos@google.com>
Cc: Alistair Delva <adelva@google.com>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Amit Pundir <amit.pundir@linaro.org>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
v2: Fix builtin_platform_driver line in driver code
v3: Add MODULE_DEVICE_TABLE() as suggested by Bjorn
---
 drivers/reset/Kconfig           | 2 +-
 drivers/reset/reset-qcom-aoss.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
index 3ad7817ce1f0..45e70524af36 100644
--- a/drivers/reset/Kconfig
+++ b/drivers/reset/Kconfig
@@ -99,7 +99,7 @@ config RESET_PISTACHIO
 	  This enables the reset driver for ImgTec Pistachio SoCs.
 
 config RESET_QCOM_AOSS
-	bool "Qcom AOSS Reset Driver"
+	tristate "Qcom AOSS Reset Driver"
 	depends on ARCH_QCOM || COMPILE_TEST
 	help
 	  This enables the AOSS (always on subsystem) reset driver
diff --git a/drivers/reset/reset-qcom-aoss.c b/drivers/reset/reset-qcom-aoss.c
index 36db96750450..9333b923dda0 100644
--- a/drivers/reset/reset-qcom-aoss.c
+++ b/drivers/reset/reset-qcom-aoss.c
@@ -118,6 +118,7 @@ static const struct of_device_id qcom_aoss_reset_of_match[] = {
 	{ .compatible = "qcom,sdm845-aoss-cc", .data = &sdm845_aoss_desc },
 	{}
 };
+MODULE_DEVICE_TABLE(of, qcom_aoss_reset_of_match);
 
 static struct platform_driver qcom_aoss_reset_driver = {
 	.probe = qcom_aoss_reset_probe,
@@ -127,7 +128,7 @@ static struct platform_driver qcom_aoss_reset_driver = {
 	},
 };
 
-builtin_platform_driver(qcom_aoss_reset_driver);
+module_platform_driver(qcom_aoss_reset_driver);
 
 MODULE_DESCRIPTION("Qualcomm AOSS Reset Driver");
 MODULE_LICENSE("GPL v2");
-- 
2.17.1


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

* Re: [PATCH v3] reset: qcom-aoss: Allow CONFIG_RESET_QCOM_AOSS to be a tristate
  2020-01-08  0:19 [PATCH v3] reset: qcom-aoss: Allow CONFIG_RESET_QCOM_AOSS to be a tristate John Stultz
@ 2020-01-08  0:23 ` Bjorn Andersson
  2020-01-08  9:28   ` Philipp Zabel
  0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Andersson @ 2020-01-08  0:23 UTC (permalink / raw)
  To: John Stultz; +Cc: lkml, Todd Kjos, Alistair Delva, Amit Pundir, Philipp Zabel

On Tue 07 Jan 16:19 PST 2020, John Stultz wrote:

> Allow CONFIG_RESET_QCOM_AOSS to be set as as =m to allow for the
> driver to be loaded from a modules.
> 
> Also replaces the builtin_platform_driver() line with
> module_platform_driver() and adds a MODULE_DEVICE_TABLE() entry.
> 
> Cc: Todd Kjos <tkjos@google.com>
> Cc: Alistair Delva <adelva@google.com>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Amit Pundir <amit.pundir@linaro.org>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Signed-off-by: John Stultz <john.stultz@linaro.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> ---
> v2: Fix builtin_platform_driver line in driver code
> v3: Add MODULE_DEVICE_TABLE() as suggested by Bjorn
> ---
>  drivers/reset/Kconfig           | 2 +-
>  drivers/reset/reset-qcom-aoss.c | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> index 3ad7817ce1f0..45e70524af36 100644
> --- a/drivers/reset/Kconfig
> +++ b/drivers/reset/Kconfig
> @@ -99,7 +99,7 @@ config RESET_PISTACHIO
>  	  This enables the reset driver for ImgTec Pistachio SoCs.
>  
>  config RESET_QCOM_AOSS
> -	bool "Qcom AOSS Reset Driver"
> +	tristate "Qcom AOSS Reset Driver"
>  	depends on ARCH_QCOM || COMPILE_TEST
>  	help
>  	  This enables the AOSS (always on subsystem) reset driver
> diff --git a/drivers/reset/reset-qcom-aoss.c b/drivers/reset/reset-qcom-aoss.c
> index 36db96750450..9333b923dda0 100644
> --- a/drivers/reset/reset-qcom-aoss.c
> +++ b/drivers/reset/reset-qcom-aoss.c
> @@ -118,6 +118,7 @@ static const struct of_device_id qcom_aoss_reset_of_match[] = {
>  	{ .compatible = "qcom,sdm845-aoss-cc", .data = &sdm845_aoss_desc },
>  	{}
>  };
> +MODULE_DEVICE_TABLE(of, qcom_aoss_reset_of_match);
>  
>  static struct platform_driver qcom_aoss_reset_driver = {
>  	.probe = qcom_aoss_reset_probe,
> @@ -127,7 +128,7 @@ static struct platform_driver qcom_aoss_reset_driver = {
>  	},
>  };
>  
> -builtin_platform_driver(qcom_aoss_reset_driver);
> +module_platform_driver(qcom_aoss_reset_driver);
>  
>  MODULE_DESCRIPTION("Qualcomm AOSS Reset Driver");
>  MODULE_LICENSE("GPL v2");
> -- 
> 2.17.1
> 

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

* Re: [PATCH v3] reset: qcom-aoss: Allow CONFIG_RESET_QCOM_AOSS to be a tristate
  2020-01-08  0:23 ` Bjorn Andersson
@ 2020-01-08  9:28   ` Philipp Zabel
  0 siblings, 0 replies; 3+ messages in thread
From: Philipp Zabel @ 2020-01-08  9:28 UTC (permalink / raw)
  To: Bjorn Andersson, John Stultz; +Cc: lkml, Todd Kjos, Alistair Delva, Amit Pundir

Hi John, Bjorn,

On Tue, 2020-01-07 at 16:23 -0800, Bjorn Andersson wrote:
> On Tue 07 Jan 16:19 PST 2020, John Stultz wrote:
> 
> > Allow CONFIG_RESET_QCOM_AOSS to be set as as =m to allow for the
> > driver to be loaded from a modules.
> > 
> > Also replaces the builtin_platform_driver() line with
> > module_platform_driver() and adds a MODULE_DEVICE_TABLE() entry.
> > 
> > Cc: Todd Kjos <tkjos@google.com>
> > Cc: Alistair Delva <adelva@google.com>
> > Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> > Cc: Amit Pundir <amit.pundir@linaro.org>
> > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > Signed-off-by: John Stultz <john.stultz@linaro.org>
> 
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Thank you, applied to reset/next.

regards
Philipp


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

end of thread, other threads:[~2020-01-08  9:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08  0:19 [PATCH v3] reset: qcom-aoss: Allow CONFIG_RESET_QCOM_AOSS to be a tristate John Stultz
2020-01-08  0:23 ` Bjorn Andersson
2020-01-08  9:28   ` Philipp Zabel

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