Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8098067rwp; Wed, 19 Jul 2023 05:21:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlGxMqAlf6x062eejqLGvKVsXJZoR0LS0YgrKsPgN91MdoyJWMccEmSWn1kcp66hshgXdkhe X-Received: by 2002:a17:906:2a93:b0:989:21e4:6c6e with SMTP id l19-20020a1709062a9300b0098921e46c6emr2112259eje.53.1689769270800; Wed, 19 Jul 2023 05:21:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689769270; cv=none; d=google.com; s=arc-20160816; b=sDtlNC1KJqajmKa2huO98scJpS5xIujoRQnz+xxpxOLKkzRxpSfsYdis6ClgFC+sg+ jiTh41yP8geE8O80CXQuiN1IAIDWYTLcGKW188GvqSNpRV2lHajKvx+jeuCnyFQAoOwS 3Foml4645vE23Z6AQHbJUfCmaaC7nE20a3rNsAYGREzom6VWv2Qozr3p5obgzeq9Y8G1 Cph5iSkjUUE4v6lqVtU/VwsURNx4FDX6wFb8PLPMH5vB993OQ/gaqviG+2ATUrg4zCHz Mvu0pm/HWSQuu5SgBu9UzIG0duvHF6YuPCLpiQf6uUhTnf/VZkNA4L5wmL0iGo0CxCc2 wEEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=p4VfGXDItiz3rOhUAQIyTNmCOzkfaYXWYp0bCIPaFY4=; fh=Rai6QvzyX7A534K6TNx5q9p7lDxkfcV9qmAiGj/66Pc=; b=ZaXhFY12D3Py1DBJd8vjG2rAnf0989sBRlJsnAnKJCMAN+jBIwDgQsoZcDFGB10mD2 UTfAr7TyNJd5PnvP86pidtgsFag2CsAkfrhsJDRmDMmIy1YeD24oavOOrRSFQuzfCA00 vL1WAwujwlK1DlMzEGJnDgf2h9iOACH8zTjo6oUq4r1EN5FnmiZgLZMlm2EPrQ/2WlwC NFYVbSg160NznDqOpMO6IuwxE41qh62BbyT4Mtcj3edw2pV+HS2aHkQ0HHGTdDcUM8b/ W38ZDXmG4Sj0+ax1FN5CK4ApxUzdXe/BJUquUPxRYWcjADM6YGQxZwQJrI6TzElWfYf5 Lf3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=Vgr2o6cI; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z9-20020a1709060ac900b0098730845081si2590698ejf.599.2023.07.19.05.20.45; Wed, 19 Jul 2023 05:21:10 -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=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=Vgr2o6cI; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229574AbjGSL34 (ORCPT + 99 others); Wed, 19 Jul 2023 07:29:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229732AbjGSL3z (ORCPT ); Wed, 19 Jul 2023 07:29:55 -0400 Received: from mail-vk1-xa2a.google.com (mail-vk1-xa2a.google.com [IPv6:2607:f8b0:4864:20::a2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A090610D2 for ; Wed, 19 Jul 2023 04:29:54 -0700 (PDT) Received: by mail-vk1-xa2a.google.com with SMTP id 71dfb90a1353d-4813688e561so1933981e0c.1 for ; Wed, 19 Jul 2023 04:29:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1689766193; x=1690370993; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=p4VfGXDItiz3rOhUAQIyTNmCOzkfaYXWYp0bCIPaFY4=; b=Vgr2o6cI8lHX0NMfceh2+i/P1G842ozgB/a0J63s/W3gBktk1rCfXLxNTjs3gycu3E 6A0j9h4au9zLjLIkBNppRbaf1zlPR7dabVZSOjeU1r5dAdIWLMN1F95sY+tGVH3XeOKD huVzBUUeonRnAEHlW/Ee8CILx7Lhx6AHjVJwF+M3OqhX3iGod20aaNTGyd9bR10k134x k68szYIS+ph8uAmeX/brp0j3hbmeUR8A2jg/PWjHipYIDk681KeC094elCrs5HI/QpTQ aheHT47OzZmfkFyAwxUGBSaSyO10LZqMQkFak/KYg9XWYmOHkUGbKSuLiI2XFjWBr8pi 22wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689766193; x=1690370993; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p4VfGXDItiz3rOhUAQIyTNmCOzkfaYXWYp0bCIPaFY4=; b=V7yMs9uKmgeiLEZSeoWdUv9FhaVNeAhYQfViXGyCVpIiqYnm6gvq2GPKZR6TRsXyPz tqZkUPOuql0btgDAn4l8WnVJ94uEIaVyuTvxwhVrWswq4vIH42YXepTPrqmeT7CODhR4 bGB/7ZMSsRffSiFksVgH+sUdjfPEI8+czegg8Opjr3a9b+HAj6WJA9vqHlWLyvtcRmgd rM0DspwatV0QVE7YgJ7iV539954R0FAv3eWUjytVixNaB+z7oTSRF/5giYCrj27CxGI0 MNvZ/iCosFsiiiHlPJsR3rKn3CJpIxvUEOKl3PEvCsSWYfsqvx4V9cg64o4+Ss3TD+v2 je0g== X-Gm-Message-State: ABy/qLarc4seRBRO0Vj195ZmrNlvofPiBMWu1kkWBSzQsMXY1yh7Chwk DfujFIDau/DhXt+Msx1lmjfsjF4mA9tQXKEhQeU2/w== X-Received: by 2002:a1f:60d6:0:b0:471:7398:5af1 with SMTP id u205-20020a1f60d6000000b0047173985af1mr2313164vkb.10.1689766193751; Wed, 19 Jul 2023 04:29:53 -0700 (PDT) MIME-Version: 1.0 References: <20230717205357.2779473-1-samuel.holland@sifive.com> <20230717205357.2779473-3-samuel.holland@sifive.com> In-Reply-To: <20230717205357.2779473-3-samuel.holland@sifive.com> From: Bartosz Golaszewski Date: Wed, 19 Jul 2023 13:29:43 +0200 Message-ID: Subject: Re: [PATCH 2/2] gpio: sifive: Allow building the driver as a module To: Samuel Holland Cc: Linus Walleij , Andy Shevchenko , Rob Herring , Frank Rowand , Palmer Dabbelt , Paul Walmsley , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE, 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 On Mon, Jul 17, 2023 at 10:54=E2=80=AFPM Samuel Holland wrote: > > 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 =3D = { > .of_match_table =3D sifive_gpio_match, > }, > }; > -builtin_platform_driver(sifive_gpio_driver) > +module_platform_driver(sifive_gpio_driver) > + > +MODULE_LICENSE("GPL"); > -- > 2.40.1 > This looks good but please follow Andy's suggestion and convert all of_*() uses in the driver to generic helpers, then drop patch 1. Bart