From patchwork Fri Jun 17 10:37:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 12885510 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 8C65EC43334 for ; Fri, 17 Jun 2022 10:39:45 +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: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:In-Reply-To:References: List-Owner; bh=dtouNpRfuxFOduobQq7JMbmSdB6itTlXkA02BBKLyNs=; b=vBfD52i97b2GFx rNNii7bMUT0k9xguetJNkNraA3ln4AXqVooWAL+yA89m9cNMaHhUn2qoRyl0pboZ/Ep8J+2sx6wDv JT0cY+RYGlaxBVOtXjgmgR1LW5d23ItdazAAPQwp7FA0Hktps73spFUjrUgS+lzMEnaOcE+VWC202 OMWfGDUx2ew3evzOXhpm5cz55uXs7YmL/VDCKkvUO+5TnZ3bEUgWEeoQfCiwcmx7eaCd5rnw2b2eL thWuviNyjUQO55pCCrch4lBmBqqABVtjcJq4bcjHikUoA5e7LNE+nunmyePpxdZNSXfiG5HA3WuUH PgPAJarhDM/P05kP8zxA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o29NG-006zbB-OA; Fri, 17 Jun 2022 10:38:46 +0000 Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o29NC-006zZC-CL for linux-arm-kernel@lists.infradead.org; Fri, 17 Jun 2022 10:38:45 +0000 Received: (Authenticated sender: clement.leger@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 85BF7E0003; Fri, 17 Jun 2022 10:38:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1655462314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mpdxVeMQmq6NbsmT6VbTrJcO0H4eYfAO0o9n2OBIBmg=; b=omxlk4Ni6JnP1XlKjlRilks5/FDMs6/PaQrD/Ep9SC2NECbuog37ZexMvUeqYaIJcIvDSx QVT+k/6VHpfSsXqJpfECUrQb7TXGZPkgVxs3kO3rulRFlZ02sJgVnY8jb9MUNwrvrRcbwY /CJgOZ89VtnUNB4/JaS7+hbP2qXElpK+Shk7vlKJeDyxV9pPgEIAqsbGIgBXAm96FDqXHs 0bFvKc47S3QJYrQ9VS4kYhhk+GeChwn9Vjyk+/2nvSzqk/xdHpOQMbMLjfc1efeX5JDRyG ONf4v/b24io3DM9lq8LfPhNveDMn+SQAWKn1ZEPmnEtxh9kL0V20KCGbB8+rmQ== From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: Philipp Zabel , Lars Povlsen , Steen Hegelund , UNGLinuxDriver@microchip.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Horatiu Vultur , Allan Nielsen , Thomas Petazzoni , =?utf-8?b?Q2zDqW1lbnQgTMOp?= =?utf-8?b?Z2Vy?= Subject: [PATCH] reset: microchip-sparx5: allow building as a module Date: Fri, 17 Jun 2022 12:37:30 +0200 Message-Id: <20220617103730.490588-1-clement.leger@bootlin.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220617_033842_596663_EB55D18F X-CRM114-Status: GOOD ( 11.07 ) 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 Set RESET_MCHP_SPARX5 as a tristate and add MODULE_DEVICE_TABLE() to allow building this driver as a module. Signed-off-by: Clément Léger --- drivers/reset/Kconfig | 2 +- drivers/reset/reset-microchip-sparx5.c | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig index 93c8d07ee328..5afbe2daecb1 100644 --- a/drivers/reset/Kconfig +++ b/drivers/reset/Kconfig @@ -115,7 +115,7 @@ config RESET_LPC18XX This enables the reset controller driver for NXP LPC18xx/43xx SoCs. config RESET_MCHP_SPARX5 - bool "Microchip Sparx5 reset driver" + tristate "Microchip Sparx5 reset driver" depends on ARCH_SPARX5 || SOC_LAN966 || COMPILE_TEST default y if SPARX5_SWITCH select MFD_SYSCON diff --git a/drivers/reset/reset-microchip-sparx5.c b/drivers/reset/reset-microchip-sparx5.c index 00b612a0effa..3d54dda3593e 100644 --- a/drivers/reset/reset-microchip-sparx5.c +++ b/drivers/reset/reset-microchip-sparx5.c @@ -149,6 +149,7 @@ static const struct of_device_id mchp_sparx5_reset_of_match[] = { }, { } }; +MODULE_DEVICE_TABLE(of, mchp_sparx5_reset_of_match); static struct platform_driver mchp_sparx5_reset_driver = { .probe = mchp_sparx5_reset_probe, @@ -158,12 +159,7 @@ static struct platform_driver mchp_sparx5_reset_driver = { }, }; -static int __init mchp_sparx5_reset_init(void) -{ - return platform_driver_register(&mchp_sparx5_reset_driver); -} - -postcore_initcall(mchp_sparx5_reset_init); +module_platform_driver(mchp_sparx5_reset_driver); MODULE_DESCRIPTION("Microchip Sparx5 switch reset driver"); MODULE_AUTHOR("Steen Hegelund ");