mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Antonio Borneo <antonio.borneo@foss.st.com>
To: Russell King <linux@armlinux.org.uk>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: Antonio Borneo <antonio.borneo@foss.st.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH 6/8] irqchip/stm32mp-exti: allow build as module
Date: Mon, 6 May 2024 15:32:54 +0200	[thread overview]
Message-ID: <20240506133256.948712-7-antonio.borneo@foss.st.com> (raw)
In-Reply-To: <20240506133256.948712-1-antonio.borneo@foss.st.com>

Allow build the driver as a module by adding the necessarily hooks
in Kconfig and in the driver's code.

Since all the probe dependencies linked to this driver has already
been fixed, ignore the no more relevant 'arch_initcall'.

Signed-off-by: Antonio Borneo <antonio.borneo@foss.st.com>
---
 drivers/irqchip/Kconfig            |  6 +++++-
 drivers/irqchip/irq-stm32mp-exti.c | 15 ++++-----------
 2 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 486022fb7806e..c26d28dc0d45e 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -393,9 +393,13 @@ config PARTITION_PERCPU
 	bool
 
 config STM32MP_EXTI
-	bool
+	tristate "STM32MP extended interrupts and event controller"
+	depends on (ARCH_STM32 && !ARM_SINGLE_ARMV7M) || COMPILE_TEST
+	default y
 	select IRQ_DOMAIN
 	select GENERIC_IRQ_CHIP
+	help
+	  Support STM32MP EXTI (extended interrupts and event) controller.
 
 config STM32_EXTI
 	bool
diff --git a/drivers/irqchip/irq-stm32mp-exti.c b/drivers/irqchip/irq-stm32mp-exti.c
index 3ceff6d25b702..2958fbcfbda12 100644
--- a/drivers/irqchip/irq-stm32mp-exti.c
+++ b/drivers/irqchip/irq-stm32mp-exti.c
@@ -730,15 +730,8 @@ static struct platform_driver stm32mp_exti_driver = {
 	},
 };
 
-static int __init stm32mp_exti_arch_init(void)
-{
-	return platform_driver_register(&stm32mp_exti_driver);
-}
-
-static void __exit stm32mp_exti_arch_exit(void)
-{
-	return platform_driver_unregister(&stm32mp_exti_driver);
-}
+module_platform_driver(stm32mp_exti_driver);
 
-arch_initcall(stm32mp_exti_arch_init);
-module_exit(stm32mp_exti_arch_exit);
+MODULE_AUTHOR("Maxime Coquelin <mcoquelin.stm32@gmail.com>");
+MODULE_DESCRIPTION("STM32MP EXTI driver");
+MODULE_LICENSE("GPL");
-- 
2.34.1


  parent reply	other threads:[~2024-05-06 13:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06 13:32 [PATCH 0/8] irqchip/stm32-exti: split MCU and MPU code, allow module build Antonio Borneo
2024-05-06 13:32 ` [PATCH 1/8] irqchip/stm32-exti: add CONFIG_STM32MP_EXTI Antonio Borneo
2024-05-06 13:32 ` [PATCH 2/8] ARM: stm32: use different EXTI driver on ARMv7m and ARMv7a Antonio Borneo
2024-05-06 13:32 ` [PATCH 3/8] arm64: Kconfig: select STM32MP_EXTI on STM32 platforms Antonio Borneo
2024-05-06 13:32 ` [PATCH 4/8] irqchip/stm32-exti: split MCU and MPU code Antonio Borneo
2024-05-06 13:32 ` [PATCH 5/8] irqchip/stm32mp-exti: rename internal symbols Antonio Borneo
2024-05-06 13:32 ` Antonio Borneo [this message]
2024-05-07  5:13   ` [PATCH 6/8] irqchip/stm32mp-exti: allow build as module kernel test robot
2024-05-07  6:20   ` kernel test robot
2024-05-06 13:32 ` [PATCH 7/8] ARM: stm32: allow build irq-stm32mp-exti driver " Antonio Borneo
2024-05-06 13:32 ` [PATCH 8/8] arm64: Kconfig: " Antonio Borneo

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=20240506133256.948712-7-antonio.borneo@foss.st.com \
    --to=antonio.borneo@foss.st.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux@armlinux.org.uk \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.org \
    /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

all inboxes | Powered by JetHome®