Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp284832iog; Fri, 17 Jun 2022 03:40:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vth3cV0HcA/71Z8pDgw4KcPbffB0U3Ur6qnUgSKEdedZeg1yBvLlHFl6PyLQ9XVKJa1l0j X-Received: by 2002:a17:902:b909:b0:167:8c44:9bc1 with SMTP id bf9-20020a170902b90900b001678c449bc1mr9069728plb.47.1655462441951; Fri, 17 Jun 2022 03:40:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655462441; cv=none; d=google.com; s=arc-20160816; b=oyCc/72ZwYIY9OWHUNyapKDFYPAfa3Wm6fM+9XYijWQxfWCkeI3l9mIdb6Hw/N2bqY D+o2Z5alGKBgiHuPQz4FWh5POKjzGfd3HvypJYjfDHUESSpP2de3a7vpbj9XdmzVWT1J 80FVGMaI1QTbcJkJpNQYGWbjYagydaAaPhBJAkH80s/wpOfoeDLJMkHYS+1T/OuyBlZ0 Y9E2U2mJk5+6W6L6cFFNVyfgvHorXbglf3vd3xbALf29YpJ12lmL57kakzHrpre7ycVp HVKYpRaJXfV788kS2NRCWupmWCiL6Z6cy+9jPWZYk5x8QRbWOunAZEFGS03pRqSDC5Jh BYLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=mpdxVeMQmq6NbsmT6VbTrJcO0H4eYfAO0o9n2OBIBmg=; b=WmGeJ7IwKmkZxSC/Nbd444KBTuyBaRjsRUHlXVwfCzOpX6bbpiGTNBn4XsuKCaCI5s ICAFOpwSpQKKv3OxKMmrbxFXPASiTMvnZLmxgotgIL/UQKqF9JRhdvJZJBb6xRe6Rh1g 05bw26il/OgtBnAQil+RUWkcja5TtGX67hwl947dURMKzp4NwIZ4hgpRv0SMVdgMIcFe wANGHO9fW164Mga33gCZ8S04YVAcpFpJbaHvUsRc+FCZ0tkonoHwwQg9LbEOMFMPDQPS 9HgEXoaa4+vERW/ugVkmIlw/938TaDafRJyWQZozeSviQ5wZxZQB7O+5KUNCevum6aDT dy2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=omxlk4Ni; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iz15-20020a170902ef8f00b0016a057881c6si1506504plb.121.2022.06.17.03.40.26; Fri, 17 Jun 2022 03:40:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=omxlk4Ni; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379989AbiFQKil (ORCPT + 99 others); Fri, 17 Jun 2022 06:38:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380514AbiFQKig (ORCPT ); Fri, 17 Jun 2022 06:38:36 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A889656B23 for ; Fri, 17 Jun 2022 03:38:35 -0700 (PDT) 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?q?Cl=C3=A9ment=20L=C3=A9ger?= 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?q?Cl=C3=A9ment=20L=C3=A9ger?= 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 "); -- 2.36.1