From patchwork Fri Jul 22 04:06:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 12925952 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 1C65ECCA487 for ; Fri, 22 Jul 2022 04:08:03 +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:References:In-Reply-To: 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: List-Owner; bh=kena+iVcymPtamF/tOxRqKFxO6hSIer4FRPvar8naws=; b=QR2qHp6cfO527h qjtfytuZQrixKGbLBcDZQ/wqm8a/bKBjW3Xq0HJQDWHSuxK2pF6ONm5WgG9QWXsufI2FjrPZUX+BI kj241sjWI/OqHNPaGJtZrkBs9LFsveYvrUqX1xyR53VTJLf9H01GBG/aLNXQLQTPM4PrAM12yLokH NNxxJvlx347VX8bpIspl0bR8t7qkCiYJHYCvUZg06IxGNt5zcoECw7sIIIpXdlD3oCugjOgVebCls TxooBSYF5SvP1bmB6SNzxyVpCRssOJRvccuUx5pq/rSgM5eZuDWKDDJdM6gu+t71ifkXRqH9f1TQp WT2eb6JTPiJK7YVp0d5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEjwE-00HNxF-Mm; Fri, 22 Jul 2022 04:06:54 +0000 Received: from mail-co1nam11on2121.outbound.protection.outlook.com ([40.107.220.121] helo=NAM11-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEjvw-00HNnp-1i for linux-arm-kernel@lists.infradead.org; Fri, 22 Jul 2022 04:06:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lhceq1diDPZWpwGIdKbJvrcMMVufATVvdVDhMjx/lIaJD0T7lUnOHCBcREU+PM01P3iljfu85qWt+D0/2ZfEb+75CJOBVtZ8zedqWkaLcN4tukyE6mCE8EEqiqoOms7j30HUx0AXEtnn+tm9y/mi8lMV9rGlTrTXwaiTbH6spDu+3sC25xhUYRQUBLCoJn0Dmb60bz5IecV6AkSeFH6vWJtrgDwXTsl7pW1QjDTVZTnRJFp3axiB1T0Lx6prjV0iCgFIK7dsIDj3xkjCb/gcHET6i7Qj/WqGsdT3VvnfEKuatfiOad/HISAu0poLojqonQZAjL9rechxxpH//3FlmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oM7NXLchwVPorq6qyp5HaDRVFe11Us8AHLYVghdpYUU=; b=kFUWTLAohkX2z4/LsnnsBQviBqbfQYVbZrFmE081/exAi/FOzeBy2Ba2Cu3YlgT53McxYg/Awnh/OA9PpNuHw27gd8Vw22NwOHx1X2/Qd9+5k2y30MwgK1Oc5EtQHUXyMS+VC/UkiZg9Q/jUuV7MRrtkFSGujJuUoHjKjEsP9aqcMN0P0JDfUvuJ883pT/Dr6Cy6LQBo6O+pFD8y9mShfu5ItZBvsaEx1HuPv5p8dv45AlfrGU9rIgHSfErShYZemklGOnWdricQvBUyGHBJ67QPPlHJSBuNWJffRdYutJCLQjCbhMJ57b7awRNkkl+HeG+Wo5WvBglCqBUuRJLuFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=in-advantage.com; dmarc=pass action=none header.from=in-advantage.com; dkim=pass header.d=in-advantage.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inadvantage.onmicrosoft.com; s=selector2-inadvantage-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oM7NXLchwVPorq6qyp5HaDRVFe11Us8AHLYVghdpYUU=; b=u8DWlItTvsBtq3WmKJfF9Nvbrnso7qTFCcsinSkfhsDybgUoMF16GTR2BPPgq3zzR381E3DOrjnRM5SxMrp70XWGc8MJXbQH+8iSs2kb0vBC1SyggbVhy1H0UA49D8J4WygB5Yf/hX/ZP7X7y7A6HtDyKqOUkmKPbt8RPwl495w= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) by MN2PR10MB3919.namprd10.prod.outlook.com (2603:10b6:208:1be::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.20; Fri, 22 Jul 2022 04:06:28 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::7451:2903:45de:3912]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::7451:2903:45de:3912%7]) with mapi id 15.20.5438.023; Fri, 22 Jul 2022 04:06:28 +0000 From: Colin Foster To: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Terry Bowman , Vladimir Oltean , Wolfram Sang , Andy Shevchenko , UNGLinuxDriver@microchip.com, Steen Hegelund , Lars Povlsen , Linus Walleij , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Russell King , Heiner Kallweit , Andrew Lunn , Krzysztof Kozlowski , Rob Herring , Lee Jones , katie.morris@in-advantage.com, Florian Fainelli Subject: [PATCH v14 mfd 3/9] pinctrl: ocelot: allow pinctrl-ocelot to be loaded as a module Date: Thu, 21 Jul 2022 21:06:03 -0700 Message-Id: <20220722040609.91703-4-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220722040609.91703-1-colin.foster@in-advantage.com> References: <20220722040609.91703-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MW4PR03CA0044.namprd03.prod.outlook.com (2603:10b6:303:8e::19) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f747090e-1546-4612-2835-08da6b978c8f X-MS-TrafficTypeDiagnostic: MN2PR10MB3919:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: D7GZPKoLdCWzJ540TPEP2a+/TihdyZP1rJ2bleMBr3zK69GsehsjTurD2XlhXcVHlGl1Wv/fWcjbrBN3/odVRHULbnE3mONiV5xbKxLZchAYcCDD432fCjtax/vSkQZ2kyWKKwlxRaUF/BVhxblv08F6MIJgL1fQ5YfQZtQ+ZjZ6oeqcccDe/eg4hlSmnzgjuPPuUD3RXB12+7zyYH2jlQ+lt8n3l0LKeR+NG2yH/rb+Asavk+KeX04SD1InUPGDv57Bqrc2z2vh0YSjwidpjo2T0ldGK1Y5Mb8YVwtDHHolNpPidtKZ/pTBlAElP7v4J9ol/Wow9DwRz6Xd+aG3wsjRHSPdX7lbX4DB6gWJEon4gqmZuTtUq5qHG9L5lqtODt0BcYL/IuO1ASh7bFuX5tfhqo7FqQk53cAb7WmSBQ4cc3Zt/ZTHW2QE8scja2xpC0niu/2SWbksMvKzqELbH1DVmIZqCAspgTXjfLVeIaEEFVgGhmI0xHG37GumtJ9sYp7Z6yQKnt+a1AhdOP1aSA3hbzEULj9Ix6veqw/dNtaAAGxQEWi/PxuIalOAPTTle8A1p4gk9xg3qgfVqdt/zUoTMIsw75qvVOKeT57YeXAcLK/qB/OT+/eeGCccelgJkCtoR8D8cVhJTEBNFep2Mw/Fc2mufO4Ueer0rG2kaBgjT8rS22jWSUs53/RaUFfZ4bGBmaoU0O9ppvYH8K/lo6SQuI6jRqFrxGCoIM8WETavVlCGKQCTZ68w25idXNdqSk5pidqXp56PyW7aCFIM5t8dbBLPbUuck7xxLsxVHvKEezGBqvALn2LwUjiui96C X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2351.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(366004)(346002)(376002)(136003)(396003)(39840400004)(36756003)(6506007)(2906002)(44832011)(41300700001)(52116002)(5660300002)(1076003)(66556008)(8676002)(8936002)(4326008)(66476007)(186003)(6486002)(478600001)(6666004)(6512007)(7416002)(83380400001)(26005)(316002)(86362001)(38100700002)(2616005)(38350700002)(54906003)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: pXBiAU1fYboxrM/QeN7nUHOrrDwwAsU3yCowN9XSN7GzELpJkXtHjhdTq08Ymw78k2v4xoK92cjLqdV5hAkxUQcycidQEUGn+xv7tC2Kg4BYhINBT8sFZWKxY/mOwvo5lGigFrvkgHD2fRWVxJKjbPtvtJvXQupJO3p+ta+SX/MW55qNCilAaLAOEgztUyIw0PtMa8vc+dhRfaWZwyV+0afpzCB6Q8DdWhBlu7HYkfIYHWOK9tUTrGiBIL4ePjfqKnLqyALYjuJ4mLoGbwTx4w5jhiwJylFfdVWykVh2cIk/HhHfilRBpuHomccpFaMW3tyvr+sRuSFtNYjsG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WLgo1Q+Hz4ZblWsdfCGKg4OfUXRkAXzKoxsC4HTTSXO2lZv30l9AsdV7raJ4eTj3ZUAPYQdzRWCF7iL442/xAjv3NRVAkHmvNl6MttSDtsjplF6NHrw0r7rFaVDfZz6lVU4YcFp0yac0zy7DCxc4WPr0KjxbPhefeuwQB74Mv/I9sTtOcFUavI/IoHj/3FV68O41/l89ao9AQMbpGNN/Bd0= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: f747090e-1546-4612-2835-08da6b978c8f X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2022 04:06:27.0491 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 48e842ca-fbd8-4633-a79d-0c955a7d3aae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BbNW3BSr7AcFTuEfo1OUKRt/BQ7DzZcEKDz0Sx7nUydaDvVEfQ7rk1ZJ/2YtXV6pzjgHEy3AYGZKaMrs86vlbrKxdso0aAinNt3jfwtcOM4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB3919 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220721_210636_122562_91C74748 X-CRM114-Status: GOOD ( 14.24 ) 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 Work is being done to allow external control of Ocelot chips. When pinctrl drivers are used internally, it wouldn't make much sense to allow them to be loaded as modules. In the case where the Ocelot chip is controlled externally, this scenario becomes practical. Signed-off-by: Colin Foster Reviewed-by: Linus Walleij Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean --- v14 * No changes --- drivers/pinctrl/Kconfig | 7 ++++++- drivers/pinctrl/pinctrl-ocelot.c | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index f52960d2dfbe..ba48ff8be6e2 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig @@ -311,7 +311,7 @@ config PINCTRL_MICROCHIP_SGPIO LED controller. config PINCTRL_OCELOT - bool "Pinctrl driver for the Microsemi Ocelot and Jaguar2 SoCs" + tristate "Pinctrl driver for the Microsemi Ocelot and Jaguar2 SoCs" depends on OF depends on HAS_IOMEM select GPIOLIB @@ -321,6 +321,11 @@ config PINCTRL_OCELOT select GENERIC_PINMUX_FUNCTIONS select OF_GPIO select REGMAP_MMIO + help + Support for the internal GPIO interfaces on Microsemi Ocelot and + Jaguar2 SoCs. + + If conpiled as a module, the module name will be pinctrl-ocelot. config PINCTRL_OXNAS bool diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c index 5f4a8c5c6650..d18047d2306d 100644 --- a/drivers/pinctrl/pinctrl-ocelot.c +++ b/drivers/pinctrl/pinctrl-ocelot.c @@ -1889,6 +1889,7 @@ static const struct of_device_id ocelot_pinctrl_of_match[] = { { .compatible = "microchip,lan966x-pinctrl", .data = &lan966x_desc }, {}, }; +MODULE_DEVICE_TABLE(of, ocelot_pinctrl_of_match); static struct regmap *ocelot_pinctrl_create_pincfg(struct platform_device *pdev) { @@ -1984,4 +1985,7 @@ static struct platform_driver ocelot_pinctrl_driver = { }, .probe = ocelot_pinctrl_probe, }; -builtin_platform_driver(ocelot_pinctrl_driver); +module_platform_driver(ocelot_pinctrl_driver); + +MODULE_DESCRIPTION("Ocelot Chip Pinctrl Driver"); +MODULE_LICENSE("Dual MIT/GPL");