From patchwork Tue Jul 25 00:40:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 125241 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp2152519vqg; Mon, 24 Jul 2023 18:01:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlHgXDF7Pj0djPbBUutHjkn0cEJVN6Ebyc9Inp1f0PFODChIrS7j6OTf0nyMCwgYWhvPYOa5 X-Received: by 2002:a17:906:73c1:b0:993:f4cd:34b5 with SMTP id n1-20020a17090673c100b00993f4cd34b5mr11960270ejl.29.1690246872797; Mon, 24 Jul 2023 18:01:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690246872; cv=none; d=google.com; s=arc-20160816; b=QFXUqQPtb/UKsITPQuw/VdnAQzGu4wNmCt1VVFhlRqygMN7fd/juGKxWziz9UbLh0k +RWT5/aPffJrZXcsfVNgwDjGPrJSlt8MvsFL9iRjodAb+FyxsjPwfuSXCT0+1X0TgLKf mySJhdQi3PKtwsS/IAn2IAS1IgyDKAJMPsmHYy3UZy76yeshSrpwCynJOnchNCIm6TDY iwjYsf+g22m8V4XyL0PFa/nhDMNP00EEO4DhHrkXqUdwGwwgf9vz0fi0+HB95wcfYqlv AHweJg0viw6V20ZLz1bHWzZZ+a+J7Tqhe0DnqL0dbvUfdbjZNc2a9g/3PjwC23lwJGv3 N6bg== 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=d/7J7W9/s0ktyQK4BY9a6mNX04p7bPwNQDg3KLPOfkM=; fh=Y7he24FywPYpaChzO4XlUZSBnpHzoZzgBuTepmA0ePs=; b=mD4Pu3531sN1lkrYTNnaMcnZBG478beTXGJyLMy92l5hF54ag070PnKHfzIK9PBrDe rEXLKLrc2OHKW4wdq+Dufyts0ZY245o+qj/6JaQ4bnQ4cnkTqazgaLO6PTKNadsogT4S L+A5gvUyVYxZOR+FI61JKuzRUfGcNShxqN+FUCaH9FfA3KJIW63/SWluIaIBsc6qTXq3 K9w7cp9QtHXM0xtKgPr+WdJeWVANpVne8zsaB+IxV0Ecwp1MOMdqs/qWywvSAfANTAZq 5T4kRSY16uuASZy0LoRmc39D/OcAfGt3xMgCL3nZwF1RLxKYSbJnnWd+/Di3BBCUtDIb T/kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=P5bkF8Z6; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id op3-20020a170906bce300b00993166137f5si6971476ejb.140.2023.07.24.18.00.48; Mon, 24 Jul 2023 18:01:12 -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=P5bkF8Z6; 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 S231262AbjGYAlB (ORCPT + 99 others); Mon, 24 Jul 2023 20:41:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231260AbjGYAkx (ORCPT ); Mon, 24 Jul 2023 20:40:53 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EC3F1728 for ; Mon, 24 Jul 2023 17:40:51 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-553ad54d3c6so2450595a12.1 for ; Mon, 24 Jul 2023 17:40:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1690245651; x=1690850451; 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=d/7J7W9/s0ktyQK4BY9a6mNX04p7bPwNQDg3KLPOfkM=; b=P5bkF8Z6mF9jk7ij0sXr0gmtxntUZIEPfvXkrIF5IsH4hLgRx7uXgVHGdw5At7g9qd EENZq1PvE3GQ3V7NfQaS0zxIPvN8X8ucMSct1aL1gpKJdet4RL1Di4ZgSgUPId7oBV9H 2q8aiXT314DQjnF0Fp32oaIGuTNVoR4SOdxUQsSjNcmCqNb+LYM+L099s9dMFdO6FnCS NblA5iwYPRSHpSu4CuxDq/BJR/twkmJM8N00cQr4K87FOhR9jLffcoUTfc237osg2sqQ JvvfkMyM4pB0FOC1Z38yOrvxbqlqzoH/8xa7xdzUZjPxlQeQfZQtfmFs5GvK3j+7AInY WUuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690245651; x=1690850451; 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=d/7J7W9/s0ktyQK4BY9a6mNX04p7bPwNQDg3KLPOfkM=; b=ChiovZFCDZt0t9kWc6f3d4YncbmEwZCn3G14TjHerWvMP1USeJlSL/0Js+GS18CcWn aH4ypGe8b/qjmYf35kvJB6b2jEZnVMKRAyLwHc98IvPvccyOjCwLjxKPDR3ylILtRf5K qgTCRHfFQbA80u0K0l51aYhchBFJWHF4Dq84wItnnwMD6jRF1qHB/JTGmzlxG+n8/+9x Sh3EsX+24bZi07jzkvQ/DTol7pDWRqFpOKUkAkQTYDvpI1vQk5TvsUCzB85Ce3grc62k M+/Bxvli2xLLPhgFleFuB3sHAhglTWceDNDfzUhtIMehziTnzn/RY07jIHDYLUJQ9saA oQHA== X-Gm-Message-State: ABy/qLZ1YgLItmOYe2aTy6k49g29nwHcqD+ZNPWG3uGNUJrk0kFQ3nhi pJo/kdE7F6Jn2bYuYQSkWw9ALw== X-Received: by 2002:a05:6a20:7d86:b0:137:9622:17d0 with SMTP id v6-20020a056a207d8600b00137962217d0mr10548315pzj.58.1690245651000; Mon, 24 Jul 2023 17:40:51 -0700 (PDT) Received: from sw06.internal.sifive.com ([64.62.193.194]) by smtp.gmail.com with ESMTPSA id be11-20020a170902aa0b00b001b8a3e2c241sm9528297plb.14.2023.07.24.17.40.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jul 2023 17:40:50 -0700 (PDT) From: Samuel Holland To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko Cc: Emil Renner Berthing , Rob Herring , Frank Rowand , Samuel Holland , Palmer Dabbelt , Palmer Dabbelt , Paul Walmsley , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v3 4/4] gpio: sifive: Allow building the driver as a module Date: Mon, 24 Jul 2023 17:40:42 -0700 Message-Id: <20230725004043.381573-5-samuel.holland@sifive.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230725004043.381573-1-samuel.holland@sifive.com> References: <20230725004043.381573-1-samuel.holland@sifive.com> MIME-Version: 1.0 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_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772352304867470335 X-GMAIL-MSGID: 1772352304867470335 This can reduce the kernel image size in multiplatform configurations. Acked-by: Palmer Dabbelt Reviewed-by: Andy Shevchenko Signed-off-by: Samuel Holland --- (no changes since v2) Changes in v2: - Add MODULE_AUTHOR and MODULE_DESCRIPTION drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-sifive.c | 6 +++++- 2 files changed, 6 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 3545bc0fad13..bbc58ef0b6de 100644 --- a/drivers/gpio/gpio-sifive.c +++ b/drivers/gpio/gpio-sifive.c @@ -266,4 +266,8 @@ 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_AUTHOR("Yash Shah "); +MODULE_DESCRIPTION("SiFive GPIO driver"); +MODULE_LICENSE("GPL");