From patchwork Mon May 6 13:32:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Borneo X-Patchwork-Id: 13655455 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3D5B7C25B74 for ; Mon, 6 May 2024 13:35:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3/9IZY59IE5nQ8b+MOXCATDd920h18Sthga+h8Eo9ZQ=; b=AceQnIHgENIdTg Uqdj3WLRAkYO1qzBtJg6W8keJQKAvfWlBivsCbNg78HJ/32FchGEnptzg4aE5hr2jT8gMmlprGfM5 YYQ5imB0F1PBpArth4VVisTMjKAA4xGj5oeLrLdp22fPixsIkTv+npuB0f6/KIvW3ObcRxT8EerKM x2A2OENuVjxiE0VMcYwIcaQ0/4YM9shRzd04zf3B6Qpfr31gBdkYhx2Y2HuL+z/Sd1ODNpPjquo4/ kN9loFPOhi6RSczjuwzaM0dTkFDpMH3aAezpOYLH03SaVYyv5L1LBLXMgEXOTZt98JBCEz7veRgU+ GJzKwf+e2FVCX26cAOzA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3yUd-00000007SjJ-1kbz; Mon, 06 May 2024 13:34:59 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s3yUb-00000007ShZ-0JDI for linux-arm-kernel@lists.infradead.org; Mon, 06 May 2024 13:34:58 +0000 Received: from pps.filterd (m0288072.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 446DA4Ik016848; Mon, 6 May 2024 15:34:49 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= selector1; bh=vtOrJKt2M1GPNMF8eyCcBhxzywX0GXoX9qfsg8V6D8U=; b=LD voD8EdlJFKQdBtA3G6ImvQnBJk5Vefz58ZC//Qprfpai2DndNZyqbAYGkzR8aq1/ OaHx2naJJOzyA3tCPiGEhithKeQ2BBvnGL0A2qZyqxoCStoFk59XrmRCWTgWjcag xFrcM6uJbEpws9HmR19jO4xwN+i4BFy/ZbhZS5t6BvWjF7AHw5qjM7yyRxbnyiU4 mHkE4SxwOnpAaP956m1FV9jBW2lmoP5aLoiq9dnB5Gk5oLVVIMu+0XvMc+DfZ68U 1IQuskxnrfZfplARL2F5c91tTPZg+DT8m9iQYKebVohQCZwSGg2R79vSV6xgwzdP SuNFbP9G+RfgZWg6MT8Q== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3xwaeg7kqc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 May 2024 15:34:49 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id AAD504002D; Mon, 6 May 2024 15:34:45 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id D5A6621ADBC; Mon, 6 May 2024 15:34:12 +0200 (CEST) Received: from localhost (10.48.87.171) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 6 May 2024 15:34:12 +0200 From: Antonio Borneo To: Russell King , Maxime Coquelin , Alexandre Torgue , Catalin Marinas , Will Deacon , Thomas Gleixner CC: Antonio Borneo , , , Subject: [PATCH 6/8] irqchip/stm32mp-exti: allow build as module Date: Mon, 6 May 2024 15:32:54 +0200 Message-ID: <20240506133256.948712-7-antonio.borneo@foss.st.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240506133256.948712-1-antonio.borneo@foss.st.com> References: <20240506133256.948712-1-antonio.borneo@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.48.87.171] X-ClientProxiedBy: SAFCAS1NODE1.st.com (10.75.90.11) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-06_08,2024-05-06_02,2023-05-22_02 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240506_063457_442221_F17F0D1B X-CRM114-Status: GOOD ( 11.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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 "); +MODULE_DESCRIPTION("STM32MP EXTI driver"); +MODULE_LICENSE("GPL");