All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@baylibre.com>
To: Neil Armstrong <narmstrong@baylibre.com>, p.zabel@pengutronix.de
Cc: linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Neil Armstrong <narmstrong@baylibre.com>
Subject: Re: [PATCH] reset: meson: make it possible to build as a module
Date: Fri, 16 Oct 2020 13:44:24 -0700	[thread overview]
Message-ID: <7hd01h295j.fsf@baylibre.com> (raw)
In-Reply-To: <20201013133943.412119-1-narmstrong@baylibre.com>

Neil Armstrong <narmstrong@baylibre.com> writes:

> In order to reduce the kernel Image size on multi-platform distributions,
> make it possible to build the reset controller driver as a module.
>
> This partially reverts 8290924e ("reset: meson: make it explicitly non-modular")
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
>  drivers/reset/Kconfig       | 4 ++--
>  drivers/reset/reset-meson.c | 7 ++++++-
>  2 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> index d9efbfd29646..ab315617565f 100644
> --- a/drivers/reset/Kconfig
> +++ b/drivers/reset/Kconfig
> @@ -94,8 +94,8 @@ config RESET_LPC18XX
>  	  This enables the reset controller driver for NXP LPC18xx/43xx SoCs.
>  
>  config RESET_MESON
> -	bool "Meson Reset Driver" if COMPILE_TEST
> -	default ARCH_MESON
> +	tristate "Meson Reset Driver"
> +	default ARCH_MESON || COMPILE_TEST
>  	help
>  	  This enables the reset driver for Amlogic Meson SoCs.
>  
> diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c
> index 94d7ba88d7d2..434d5c0f877e 100644
> --- a/drivers/reset/reset-meson.c
> +++ b/drivers/reset/reset-meson.c
> @@ -9,6 +9,7 @@
>  #include <linux/init.h>
>  #include <linux/io.h>
>  #include <linux/of.h>
> +#include <linux/module.h>
>  #include <linux/platform_device.h>
>  #include <linux/reset-controller.h>
>  #include <linux/slab.h>
> @@ -142,4 +143,8 @@ static struct platform_driver meson_reset_driver = {
>  		.of_match_table	= meson_reset_dt_ids,
>  	},
>  };
> -builtin_platform_driver(meson_reset_driver);
> +module_platform_driver(meson_reset_driver);

I tried this as as a module, and it never probed because it's missing
this on the compatible table:

   MODULE_DEVICE_TABLE(of, meson_reset_dt_ids);

With that minor change:

Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>

Kevin

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

WARNING: multiple messages have this Message-ID (diff)
From: Kevin Hilman <khilman@baylibre.com>
To: Neil Armstrong <narmstrong@baylibre.com>, p.zabel@pengutronix.de
Cc: linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Neil Armstrong <narmstrong@baylibre.com>
Subject: Re: [PATCH] reset: meson: make it possible to build as a module
Date: Fri, 16 Oct 2020 13:44:24 -0700	[thread overview]
Message-ID: <7hd01h295j.fsf@baylibre.com> (raw)
In-Reply-To: <20201013133943.412119-1-narmstrong@baylibre.com>

Neil Armstrong <narmstrong@baylibre.com> writes:

> In order to reduce the kernel Image size on multi-platform distributions,
> make it possible to build the reset controller driver as a module.
>
> This partially reverts 8290924e ("reset: meson: make it explicitly non-modular")
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
>  drivers/reset/Kconfig       | 4 ++--
>  drivers/reset/reset-meson.c | 7 ++++++-
>  2 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> index d9efbfd29646..ab315617565f 100644
> --- a/drivers/reset/Kconfig
> +++ b/drivers/reset/Kconfig
> @@ -94,8 +94,8 @@ config RESET_LPC18XX
>  	  This enables the reset controller driver for NXP LPC18xx/43xx SoCs.
>  
>  config RESET_MESON
> -	bool "Meson Reset Driver" if COMPILE_TEST
> -	default ARCH_MESON
> +	tristate "Meson Reset Driver"
> +	default ARCH_MESON || COMPILE_TEST
>  	help
>  	  This enables the reset driver for Amlogic Meson SoCs.
>  
> diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c
> index 94d7ba88d7d2..434d5c0f877e 100644
> --- a/drivers/reset/reset-meson.c
> +++ b/drivers/reset/reset-meson.c
> @@ -9,6 +9,7 @@
>  #include <linux/init.h>
>  #include <linux/io.h>
>  #include <linux/of.h>
> +#include <linux/module.h>
>  #include <linux/platform_device.h>
>  #include <linux/reset-controller.h>
>  #include <linux/slab.h>
> @@ -142,4 +143,8 @@ static struct platform_driver meson_reset_driver = {
>  		.of_match_table	= meson_reset_dt_ids,
>  	},
>  };
> -builtin_platform_driver(meson_reset_driver);
> +module_platform_driver(meson_reset_driver);

I tried this as as a module, and it never probed because it's missing
this on the compatible table:

   MODULE_DEVICE_TABLE(of, meson_reset_dt_ids);

With that minor change:

Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>

Kevin

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

WARNING: multiple messages have this Message-ID (diff)
From: Kevin Hilman <khilman@baylibre.com>
To: Neil Armstrong <narmstrong@baylibre.com>, p.zabel@pengutronix.de
Cc: linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Neil Armstrong <narmstrong@baylibre.com>
Subject: Re: [PATCH] reset: meson: make it possible to build as a module
Date: Fri, 16 Oct 2020 13:44:24 -0700	[thread overview]
Message-ID: <7hd01h295j.fsf@baylibre.com> (raw)
In-Reply-To: <20201013133943.412119-1-narmstrong@baylibre.com>

Neil Armstrong <narmstrong@baylibre.com> writes:

> In order to reduce the kernel Image size on multi-platform distributions,
> make it possible to build the reset controller driver as a module.
>
> This partially reverts 8290924e ("reset: meson: make it explicitly non-modular")
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
>  drivers/reset/Kconfig       | 4 ++--
>  drivers/reset/reset-meson.c | 7 ++++++-
>  2 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> index d9efbfd29646..ab315617565f 100644
> --- a/drivers/reset/Kconfig
> +++ b/drivers/reset/Kconfig
> @@ -94,8 +94,8 @@ config RESET_LPC18XX
>  	  This enables the reset controller driver for NXP LPC18xx/43xx SoCs.
>  
>  config RESET_MESON
> -	bool "Meson Reset Driver" if COMPILE_TEST
> -	default ARCH_MESON
> +	tristate "Meson Reset Driver"
> +	default ARCH_MESON || COMPILE_TEST
>  	help
>  	  This enables the reset driver for Amlogic Meson SoCs.
>  
> diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c
> index 94d7ba88d7d2..434d5c0f877e 100644
> --- a/drivers/reset/reset-meson.c
> +++ b/drivers/reset/reset-meson.c
> @@ -9,6 +9,7 @@
>  #include <linux/init.h>
>  #include <linux/io.h>
>  #include <linux/of.h>
> +#include <linux/module.h>
>  #include <linux/platform_device.h>
>  #include <linux/reset-controller.h>
>  #include <linux/slab.h>
> @@ -142,4 +143,8 @@ static struct platform_driver meson_reset_driver = {
>  		.of_match_table	= meson_reset_dt_ids,
>  	},
>  };
> -builtin_platform_driver(meson_reset_driver);
> +module_platform_driver(meson_reset_driver);

I tried this as as a module, and it never probed because it's missing
this on the compatible table:

   MODULE_DEVICE_TABLE(of, meson_reset_dt_ids);

With that minor change:

Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>

Kevin

  parent reply	other threads:[~2020-10-16 20:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-13 13:39 [PATCH] reset: meson: make it possible to build as a module Neil Armstrong
2020-10-13 13:39 ` Neil Armstrong
2020-10-13 13:39 ` Neil Armstrong
2020-10-13 14:57 ` Robin Murphy
2020-10-13 14:57   ` Robin Murphy
2020-10-13 14:57   ` Robin Murphy
2020-10-14  7:43   ` Neil Armstrong
2020-10-14  7:43     ` Neil Armstrong
2020-10-14  7:43     ` Neil Armstrong
2020-10-16 20:44 ` Kevin Hilman [this message]
2020-10-16 20:44   ` Kevin Hilman
2020-10-16 20:44   ` Kevin Hilman

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=7hd01h295j.fsf@baylibre.com \
    --to=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    /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.