Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6066085rwp; Mon, 17 Jul 2023 14:20:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlGa/aUWb+qHTNx7t3Baz/ksbhNGxb0bg6FDumA+0oZRmpU8Jrt9jbhDnkY1DJP4vTK6dOg2 X-Received: by 2002:a17:903:230e:b0:1b8:1636:b26 with SMTP id d14-20020a170903230e00b001b816360b26mr15066895plh.3.1689628852770; Mon, 17 Jul 2023 14:20:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689628852; cv=none; d=google.com; s=arc-20160816; b=jMSpBeRVScqdQJb519/SAH/m3+JO9LJAJr7znmPusMmfLofRU2EH21otA+nFoBTaHP bG+DO/4lewugIymER56vMTEiDgCCOO16CydwknJg0FTGA0wiG0wTCzSbSq2So7InVTd0 6M46liBDgj/jVusS7GIdlLwdpGqXsWl2HtTy12EEh4JVBwFwk0RmDIsxXkEMJW+FmvwV +TpMi4hQcEO5bjEjanHbPZ8m0U7a8N8C/QC/06Q2WaYuewUo49iByETaTjmc0sFQHpmo a5I8NXM7oDKq2w6vy47IotlXqJvs8Q67qZzdhYx9jHdcf9VW8hNGEtworaK/UdNMHoWb AcKA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rPXSCcl7xyJKFXuJ0sfDEh5nIT26utMEmgdVi+YRduc=; fh=sbkPInvQTTWwR8kcDHsLRpLGMwcswGQUr2GMWQdoqBc=; b=0sZ0XOkovjGAlT8QBP4LzVCA953GqUqSkqwgbu3ufGSXvKeIl0z/1KZnE/BpWJrdFh iggLGdJliQczQJlom/7LJ+i0Y01cSjb/O6gE10ViP7ncee4RwlDIcze2DLmDW5Nr+gZV 6gRURoBn+TyVmiYbDfUBirD6Ygvm3rBgdk3WvIEmybCnBLWLlX7RCRLtJgy7hQY3l83N RhJYWMxVBp/n6ISUwO61vHyAMk9v7eRoktU+QAmphQ4jNOw2uQirid6bLfwyLFCM1wVY IZxYkbqbB0KEOjgm6rAXzm5JdOxeVGZJSj2PwZ1bUgJs9jklvxhV4o6EEYy1JNy1v3j8 kc+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=VzNOXhf+; 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=sifive.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l1-20020a170902d04100b001b06e17610fsi406056pll.321.2023.07.17.14.20.40; Mon, 17 Jul 2023 14:20:52 -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=@sifive.com header.s=google header.b=VzNOXhf+; 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=sifive.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231311AbjGQUyX (ORCPT + 99 others); Mon, 17 Jul 2023 16:54:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231355AbjGQUyE (ORCPT ); Mon, 17 Jul 2023 16:54:04 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1371E10C4 for ; Mon, 17 Jul 2023 13:54:02 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-262c42d3fafso3061544a91.0 for ; Mon, 17 Jul 2023 13:54:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1689627241; x=1692219241; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rPXSCcl7xyJKFXuJ0sfDEh5nIT26utMEmgdVi+YRduc=; b=VzNOXhf+impRuQDbYHrHRlqKEi4dq4XPmar0nNzv6mvU84AiDYv9Z8hDwrbcuh/mS0 AgX5iAz4at+qFL9Qlc9V9bUmdwa+KLbCIrTMUe+/rwDoMrjNS01UNaZCPQPFEYNXMfGq XrOpEMqW2ID2b5Kv7fLAl/V9ydXP2MBLtM4tZYZkv79U6vGznTx8gSRmlBPtNuu83jN/ +CZvicmJK8bHZurlYy33pU0fBP0I6KRiOPK42VmiMb77zsTfwcERc3OiLqnHUiPRx0Od 41lB6iSmwxSSceokNRnKYx2C1p2NehPKLu8wdS5NoDzDgEpmu7ywu/phkTrFWHNF6ApV tLcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689627241; x=1692219241; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rPXSCcl7xyJKFXuJ0sfDEh5nIT26utMEmgdVi+YRduc=; b=DpXUHIcNAqIUi52SWbM1TMxM8VpAiWFB2H8E8kp8sCtB3ZUxBCVlBuPeAvkMDx7OFy ixqZUQkDtZdEZrLeNB75xMFjDF4doQXgMCWl9eXJvGiVDh6EDhjbGmwbiNq7e6TtC1f1 YNNwGff3ssfx3NgQlFujs/bJpRCAsXOXYKF9gnGoeWIP15RgRsUcoFWunUexRdcpM8Yi OU9ZJm3vYfbPTaul28zxFNcM46zDEVf/BaFlIWvGIkdHHcZ708sZjsujurtGh04p0Fed VeDOeQ71DJVKq2mDINeZY1Oekm6fj9bvkp6nAIqESLesKH4S0wqB1V2wApZbvz3n4eT6 tOtA== X-Gm-Message-State: ABy/qLZpUC/ek1Usct/t65G6wZe64e+efcshFd5bASWlEhZjIlAVcWJ8 CmwP0EsbHmv4kH8pL6LJV6r9EiTWq0dBLQ9GlGlIQw== X-Received: by 2002:a17:90a:a614:b0:263:f3d0:7ea2 with SMTP id c20-20020a17090aa61400b00263f3d07ea2mr13459056pjq.8.1689627241539; Mon, 17 Jul 2023 13:54:01 -0700 (PDT) Received: from sw06.internal.sifive.com ([64.62.193.194]) by smtp.gmail.com with ESMTPSA id z8-20020a63b048000000b0053031f7a367sm206991pgo.85.2023.07.17.13.54.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 13:54:01 -0700 (PDT) From: Samuel Holland To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Rob Herring , Frank Rowand Cc: Samuel Holland , Palmer Dabbelt , Paul Walmsley , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH 2/2] gpio: sifive: Allow building the driver as a module Date: Mon, 17 Jul 2023 13:53:57 -0700 Message-Id: <20230717205357.2779473-3-samuel.holland@sifive.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230717205357.2779473-1-samuel.holland@sifive.com> References: <20230717205357.2779473-1-samuel.holland@sifive.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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 This can reduce the kernel image size in multiplatform configurations. Signed-off-by: Samuel Holland --- drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-sifive.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index e382dfebad7c..1a8e8a8c85d6 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -564,7 +564,7 @@ config GPIO_SAMA5D2_PIOBU maintain their value during backup/self-refresh. config GPIO_SIFIVE - bool "SiFive GPIO support" + tristate "SiFive GPIO support" depends on OF_GPIO select IRQ_DOMAIN_HIERARCHY select GPIO_GENERIC diff --git a/drivers/gpio/gpio-sifive.c b/drivers/gpio/gpio-sifive.c index 745e5f67254e..5941a817491c 100644 --- a/drivers/gpio/gpio-sifive.c +++ b/drivers/gpio/gpio-sifive.c @@ -277,4 +277,6 @@ static struct platform_driver sifive_gpio_driver = { .of_match_table = sifive_gpio_match, }, }; -builtin_platform_driver(sifive_gpio_driver) +module_platform_driver(sifive_gpio_driver) + +MODULE_LICENSE("GPL"); -- 2.40.1