All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Anson Huang <Anson.Huang@nxp.com>,
	catalin.marinas@arm.com, will@kernel.org,
	lorenzo.pieralisi@arm.com, robh@kernel.org, bhelgaas@google.com,
	shawnguo@kernel.org, s.hauer@pengutronix.de,
	kernel@pengutronix.de, festevam@gmail.com,
	bjorn.andersson@linaro.org, leoyang.li@nxp.com, vkoul@kernel.org,
	geert+renesas@glider.be, olof@lixom.net, treding@nvidia.com,
	gustavo.pimentel@synopsys.com, amurray@thegoodpenguin.co.uk,
	vidyas@nvidia.com, xiaowei.bao@nxp.com, jonnyc@amazon.com,
	hayashi.kunihiko@socionext.com, eswara.kota@linux.intel.com,
	krzk@kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Cc: Linux-imx@nxp.com
Subject: Re: [PATCH V2 1/3] reset: imx7: Support module build
Date: Mon, 20 Jul 2020 11:22:22 +0200	[thread overview]
Message-ID: <9c2d6c888817880974f850622b14905a9338b60e.camel@pengutronix.de> (raw)
In-Reply-To: <1593443129-18766-1-git-send-email-Anson.Huang@nxp.com>

On Mon, 2020-06-29 at 23:05 +0800, Anson Huang wrote:
> Add module device table, author, description and license to support
> module build, and CONFIG_RESET_IMX7 is changed to default 'y' ONLY
> for i.MX7D, other platforms need to select it in defconfig.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
> Changes since V1:
> 	- make it default 'y' for SOC_IMX7D;
> 	- add module author, description;
> 	- use device_initcall instead of builtin_platform_driver() to support
> 	  module unload.
> ---
>  drivers/reset/Kconfig      |  5 +++--
>  drivers/reset/reset-imx7.c | 14 ++++++++++++--
>  2 files changed, 15 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> index d9efbfd..19f9773 100644
> --- a/drivers/reset/Kconfig
> +++ b/drivers/reset/Kconfig
> @@ -65,9 +65,10 @@ config RESET_HSDK
>  	  This enables the reset controller driver for HSDK board.
>  
>  config RESET_IMX7
> -	bool "i.MX7/8 Reset Driver" if COMPILE_TEST
> +	tristate "i.MX7/8 Reset Driver"
>  	depends on HAS_IOMEM
> -	default SOC_IMX7D || (ARM64 && ARCH_MXC)
> +	depends on SOC_IMX7D || (ARM64 && ARCH_MXC) || COMPILE_TEST
> +	default y if SOC_IMX7D
>  	select MFD_SYSCON
>  	help
>  	  This enables the reset controller driver for i.MX7 SoCs.
> diff --git a/drivers/reset/reset-imx7.c b/drivers/reset/reset-imx7.c
> index d170fe6..c710f789 100644
> --- a/drivers/reset/reset-imx7.c
> +++ b/drivers/reset/reset-imx7.c
> @@ -8,7 +8,7 @@
>   */
>  
>  #include <linux/mfd/syscon.h>
> -#include <linux/mod_devicetable.h>
> +#include <linux/module.h>
>  #include <linux/of_device.h>
>  #include <linux/platform_device.h>
>  #include <linux/reset-controller.h>
> @@ -386,6 +386,7 @@ static const struct of_device_id imx7_reset_dt_ids[] = {
>  	{ .compatible = "fsl,imx8mp-src", .data = &variant_imx8mp },
>  	{ /* sentinel */ },
>  };
> +MODULE_DEVICE_TABLE(of, imx7_reset_dt_ids);
>  
>  static struct platform_driver imx7_reset_driver = {
>  	.probe	= imx7_reset_probe,
> @@ -394,4 +395,13 @@ static struct platform_driver imx7_reset_driver = {
>  		.of_match_table	= imx7_reset_dt_ids,
>  	},
>  };
> -builtin_platform_driver(imx7_reset_driver);
> +
> +static int __init imx7_reset_init(void)
> +{
> +	return platform_driver_register(&imx7_reset_driver);
> +}
> +device_initcall(imx7_reset_init);

Shouldn't this use module_platform_driver instead?

regards
Philipp

WARNING: multiple messages have this Message-ID (diff)
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Anson Huang <Anson.Huang@nxp.com>,
	catalin.marinas@arm.com, will@kernel.org,
	 lorenzo.pieralisi@arm.com, robh@kernel.org, bhelgaas@google.com,
	 shawnguo@kernel.org, s.hauer@pengutronix.de,
	kernel@pengutronix.de,  festevam@gmail.com,
	bjorn.andersson@linaro.org, leoyang.li@nxp.com,
	 vkoul@kernel.org, geert+renesas@glider.be, olof@lixom.net,
	treding@nvidia.com,  gustavo.pimentel@synopsys.com,
	amurray@thegoodpenguin.co.uk, vidyas@nvidia.com,
	 xiaowei.bao@nxp.com, jonnyc@amazon.com,
	hayashi.kunihiko@socionext.com,  eswara.kota@linux.intel.com,
	krzk@kernel.org,  linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,  linux-pci@vger.kernel.org
Cc: Linux-imx@nxp.com
Subject: Re: [PATCH V2 1/3] reset: imx7: Support module build
Date: Mon, 20 Jul 2020 11:22:22 +0200	[thread overview]
Message-ID: <9c2d6c888817880974f850622b14905a9338b60e.camel@pengutronix.de> (raw)
In-Reply-To: <1593443129-18766-1-git-send-email-Anson.Huang@nxp.com>

On Mon, 2020-06-29 at 23:05 +0800, Anson Huang wrote:
> Add module device table, author, description and license to support
> module build, and CONFIG_RESET_IMX7 is changed to default 'y' ONLY
> for i.MX7D, other platforms need to select it in defconfig.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
> Changes since V1:
> 	- make it default 'y' for SOC_IMX7D;
> 	- add module author, description;
> 	- use device_initcall instead of builtin_platform_driver() to support
> 	  module unload.
> ---
>  drivers/reset/Kconfig      |  5 +++--
>  drivers/reset/reset-imx7.c | 14 ++++++++++++--
>  2 files changed, 15 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> index d9efbfd..19f9773 100644
> --- a/drivers/reset/Kconfig
> +++ b/drivers/reset/Kconfig
> @@ -65,9 +65,10 @@ config RESET_HSDK
>  	  This enables the reset controller driver for HSDK board.
>  
>  config RESET_IMX7
> -	bool "i.MX7/8 Reset Driver" if COMPILE_TEST
> +	tristate "i.MX7/8 Reset Driver"
>  	depends on HAS_IOMEM
> -	default SOC_IMX7D || (ARM64 && ARCH_MXC)
> +	depends on SOC_IMX7D || (ARM64 && ARCH_MXC) || COMPILE_TEST
> +	default y if SOC_IMX7D
>  	select MFD_SYSCON
>  	help
>  	  This enables the reset controller driver for i.MX7 SoCs.
> diff --git a/drivers/reset/reset-imx7.c b/drivers/reset/reset-imx7.c
> index d170fe6..c710f789 100644
> --- a/drivers/reset/reset-imx7.c
> +++ b/drivers/reset/reset-imx7.c
> @@ -8,7 +8,7 @@
>   */
>  
>  #include <linux/mfd/syscon.h>
> -#include <linux/mod_devicetable.h>
> +#include <linux/module.h>
>  #include <linux/of_device.h>
>  #include <linux/platform_device.h>
>  #include <linux/reset-controller.h>
> @@ -386,6 +386,7 @@ static const struct of_device_id imx7_reset_dt_ids[] = {
>  	{ .compatible = "fsl,imx8mp-src", .data = &variant_imx8mp },
>  	{ /* sentinel */ },
>  };
> +MODULE_DEVICE_TABLE(of, imx7_reset_dt_ids);
>  
>  static struct platform_driver imx7_reset_driver = {
>  	.probe	= imx7_reset_probe,
> @@ -394,4 +395,13 @@ static struct platform_driver imx7_reset_driver = {
>  		.of_match_table	= imx7_reset_dt_ids,
>  	},
>  };
> -builtin_platform_driver(imx7_reset_driver);
> +
> +static int __init imx7_reset_init(void)
> +{
> +	return platform_driver_register(&imx7_reset_driver);
> +}
> +device_initcall(imx7_reset_init);

Shouldn't this use module_platform_driver instead?

regards
Philipp

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-07-20  9:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-29 15:05 [PATCH V2 1/3] reset: imx7: Support module build Anson Huang
2020-06-29 15:05 ` Anson Huang
2020-06-29 15:05 ` [PATCH V2 2/3] arm64: defconfig: Select CONFIG_RESET_IMX7 as module by default Anson Huang
2020-06-29 15:05   ` Anson Huang
2020-06-29 15:05 ` [PATCH V2 3/3] pci: imx: Select RESET_IMX7 " Anson Huang
2020-06-29 15:05   ` Anson Huang
2020-06-29 18:53   ` Bjorn Helgaas
2020-06-29 18:53     ` Bjorn Helgaas
2020-07-20  9:22 ` Philipp Zabel [this message]
2020-07-20  9:22   ` [PATCH V2 1/3] reset: imx7: Support module build Philipp Zabel
2020-07-20 13:52   ` Anson Huang
2020-07-20 13:52     ` Anson Huang

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=9c2d6c888817880974f850622b14905a9338b60e.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=Anson.Huang@nxp.com \
    --cc=Linux-imx@nxp.com \
    --cc=amurray@thegoodpenguin.co.uk \
    --cc=bhelgaas@google.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=eswara.kota@linux.intel.com \
    --cc=festevam@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=gustavo.pimentel@synopsys.com \
    --cc=hayashi.kunihiko@socionext.com \
    --cc=jonnyc@amazon.com \
    --cc=kernel@pengutronix.de \
    --cc=krzk@kernel.org \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=olof@lixom.net \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=treding@nvidia.com \
    --cc=vidyas@nvidia.com \
    --cc=vkoul@kernel.org \
    --cc=will@kernel.org \
    --cc=xiaowei.bao@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.