From patchwork Tue Jul 5 20:47:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 12907009 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 896ACCCA47F for ; Tue, 5 Jul 2022 20:48:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232223AbiGEUsv (ORCPT ); Tue, 5 Jul 2022 16:48:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231891AbiGEUsR (ORCPT ); Tue, 5 Jul 2022 16:48:17 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2113.outbound.protection.outlook.com [40.107.92.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A5A5101EA; Tue, 5 Jul 2022 13:48:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dYtG0gaiPydjClfVaVYvMjH6JmxqqWsVb2Cx6cgWXcQ7OQZRDD1jEwNC6TPtenHoprj9Vg96H0fG5/9Vl//QTkRcqEFBejCfERkeXqgfRidVD/HvURUfOJnOY1uVQ0+uJZjT/gKvaqr2fIY4wVjh4nn6TmfKLeQF4XUAEnYwv2tmtQdkfmt4qLr6Mo9bjdKYIEp92J/CbBEKnO6zNgiYsg4gBOcmPfc+MYuIW9FROBpoRp4ydaSRs+tbiFrtcnN6r+n9RXhih1jR2M4ZDt4NJiihaWQ0jgb5jo1gqqz5oG6n9v+8GoYNd2CfJ0YKlGu7zmdheXHJ2pzufI0U2UDcwg== 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=mMFdAGzwoQHjdpAqZlZIm/n61SF9csxZswK30YGhLRY=; b=JjOpnPQTpXfyVNN4j71KjN4nw+rgmbgNpYNuVrrTE3ewDNBl8Do9XVXEoHKN7iVDo6SBMQty01p6FzU6EvgB8APm0knizBaJ3yiZlMpWKkx0rqGR9T3M9x+mok1E/cZH5pE9kp7tMal0CFQNyudUV9zwW7k6AhJ6LwmD/90Yx/96Tsg4lA9WwrtL6CaWsTgxJeMF0PLfz7h7iOGji3BuOm2IpWSnZVnsiZpd8okOCeTHGYXrjWbEGJ3E6qAsSgfq3QtgXKxEKyb/M7NDEgJmFEoCFSBRX2yv602CvxVw4rr5G8Ex1WlPyaHIuqr5agmub6Ot4b972WwXwAJBw1sspw== 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=mMFdAGzwoQHjdpAqZlZIm/n61SF9csxZswK30YGhLRY=; b=As29xDqqi2hJZbODvVFAB+Hy/h2VZIQ9L6voPIy8BTweF1SF4AQ0m/L4qf/LNMMh0AII8UGI0kX/5qcbi4Ut7vE0yRbQylmMKyRJjxSwdj1yxXQr4e20tUXjRUhO7MThlxmqUtjol3s+qtt7NRJrXI/yby8L/DFYVoCt769bdog= 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 BL0PR10MB2898.namprd10.prod.outlook.com (2603:10b6:208:75::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.15; Tue, 5 Jul 2022 20:48:12 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::712f:6916:3431:e74e]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::712f:6916:3431:e74e%6]) with mapi id 15.20.5395.020; Tue, 5 Jul 2022 20:48:12 +0000 From: Colin Foster To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org Cc: Vladimir Oltean , Lee Jones , Rob Herring , Krzysztof Kozlowski , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lars Povlsen , Steen Hegelund , UNGLinuxDriver@microchip.com, Linus Walleij , Wolfram Sang , Terry Bowman , Andy Shevchenko , katie.morris@in-advantage.com, Florian Fainelli Subject: [PATCH v13 net-next 3/9] pinctrl: ocelot: allow pinctrl-ocelot to be loaded as a module Date: Tue, 5 Jul 2022 13:47:37 -0700 Message-Id: <20220705204743.3224692-4-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220705204743.3224692-1-colin.foster@in-advantage.com> References: <20220705204743.3224692-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MW2PR2101CA0001.namprd21.prod.outlook.com (2603:10b6:302:1::14) 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: cb1fdb1d-957b-44d5-15d8-08da5ec7acdc X-MS-TrafficTypeDiagnostic: BL0PR10MB2898:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: m0po4xwYcSZIYwRJXL8hMqHuulnGs8SRGef0UFVWjsofUZfbYOkX6IHQWF3t7CeEEitA5x8+G0qkvH7SrAW95eZa1kbRc+w3+O0tl0yhICaBJ+lGmHkUgHvBVfpAwhbPt2qoiM12t6USbW5LCMLz8PLKBLQHKTht1pGJoxwlbrd+SQDmqEnsxgjVkHiaMOeWsfZhS93/R4AwSgUjHcSz5AeIsYVHdc1X3UCpoTAm6wLmDXthZnKj8SSyco1uJjN+8K3CPR7O9ljom06ExQmGJQO7mu0dj+tTcpFtHwE1mP+5ypWzMqumlUOb1TSsFpfSPJ7ahxduEWM3bjLeND9XA3djYOh/NM5JNzNXM3R9ec6PKo/KVdnurZBAd1KqxN6TNVx9emEwK5gxNsqS7gv+id4QNgnow7Fzt6yM2YWdtcY5yaRvSop3m62CaNfe7ISsK/E7nEQN/dNB3OGB8KRiTO9Xc2CvGXP198IUOCQZaJQlZ4qwP3t5zoNnWINCQiMv7uqza7z5gYFwLLtna7vOmF/61zz280N6MG0jSACP37p36CDAa1HAljZ6AycfPu2JghYicsKFgz7eE7eeHoFY5jWKgq+QK3sEp9W6cbG8BQ/FTNysfW7OvybZZi3axId23NxH10OBz5PP4w3CN4g4rQx6nOdtBsEdpXBANyXfzyS9NLORXBC9bK/2lfzt1j5WAU6N7STZHJ50wF4oDjAN0Ji7uaHs7iwIFrSPtnGPmmjtHJeFA5KIhONNPvGk0aTmpm1jYYmOaj98dWEAeFc6IG4DskFb4bakjdDnNBMXCxt+CD6qWbGGOitsw2hdrGvg 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)(39830400003)(376002)(346002)(136003)(396003)(366004)(478600001)(38350700002)(66556008)(66476007)(8676002)(66946007)(4326008)(316002)(38100700002)(186003)(2616005)(1076003)(6486002)(41300700001)(26005)(6506007)(6666004)(52116002)(6512007)(54906003)(83380400001)(5660300002)(86362001)(2906002)(44832011)(7416002)(36756003)(8936002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5BGREWkgNC1FXH2nzxc45s0xSilz2OZB0EnQp/A7fUKmLgAAPkPGQbSHSMAkHQurINdqHQeJC75QhCBz1FtgfdDkUDadjJhxGutz2HqwcgvnQ1tthrdtnJz6NtJGmizA2cJ3W/6xXyT4sSafyYjyTTzB9CkwOjhsMLEIy5GL/B8XfrnLqDdwW3a+cChX/uMIebxJZ9lp28ttPzbbkVTFbM+L+vwnpS44PPPvUgb2hKTDQVYbR/TH9f5q8wyS7T0ETzznckuRfHjJSKhOem8pDIdGQKEFXcYYhMEP8NHTDq1pZRlsyH9GcrS8IST2o/+AzKaHwCinzdcVX03qwnEaTVLy4sWN4oJ9XoYtWTuyPDFbhIobO7uotreZ7ZObXDXwyX7wwkRFigo/0xgZGQM8vsIzoCRyw8psJUndolw0a1pBurBzBLUIvsYkH2Q02NEjR9TVH6YbnCCellRnraP+SFfMRPuJxTIayTyojnpljugsyB+EFkr19oJEse/RAQg+MM/7c97MDgsL74jbubirvNUt6/E4hDf5fBOU5xLO5JigwWad+tChA0/Jn8NMyxU0vquU8yON0SCpasLwyHuQMCZzyqbEoyrMgEeBfBiLe04+z6/auvc42ORGoejgfh9aPv69ASRaE60C41yLVCRAYkrPApIOXOj4uB1KG0ekVjTlnwIYCLjcberIN97twm1N65SVimvGjwlk942xDJpRMIDpEtJUbtXVE5BNB82xCm4z8gKnNjZH9E4WkZynp2Vbjz8JifHH3m/eDhJmg0K+//19H+GXj6GZ/I82FvvCE6+eAUE+5qTCEDqGKfGYjbtMGPY1ZKeg6rsSqQMIT2blf0E4K67lScYh/HI3GYRJEa92MJ/YcNoHNGcbV3gYw4r9CxKfLTwyX2g+qR/NwLOXU3alhn2B/79QeWhphRrwC54o5ZBxgOePdGEY/9oKvWLA74NIgaZx2eQ20jMFO0rFb6gTOAOauBT53/2Fiw9/GXafYgYqfw4C6eqIMgyfOh7VKrLj+mfIMNf0AhzFjc3JUMcCos5NHjno9dxMLDHgNR9eKoWPrsbbFq4yzV15he10N0EnohMki+jNHA+c1tZ5YbyX5rjKCmJhgyEhYajVYDuXy6GibjBvxw+VEhEvzCfKjfo/SVbJhAhlJtjSILolaaHa7LwmHUWQgbnKF0xNwWYo3LT3j1Skb3mMnWIdt5qBxJ4YCPrKvvmPFcJSgeHAEpBInhVojhDCN2w7IK7WlFrg5BsgLyQxiXYLO4sE5/n4dJzOsa4S5N/JpaA6ZGdg28xsF6mloj9rBnGgBeC7pT/LkJIrQdHliXxOez8dQZhUIZCRKm3UjfRwNL7dBWZo/kNaFO/a8Snjd6+lDDlRb1UTCLEqyB8LHsLSXWxjwQsESNJxLLGljUr4PPdQFBMhFCdyuWOO2MzJp0cNbY9OlN2CKeR6R6LmO0zfaCGfLn7cG0FcaBjFQ4yi4lCoAGtw8TYifIk6FXCD13iyhhXlkdi/nV10GpRjOXAVyfYS+/jy24ttWL7eTGPK/c8hZZTLvVmPldzNBB5/1pqOto6g7bVAp8JxkATkibO2M02uxp34u66mLEuaYc5cTQVstCIbeg== X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb1fdb1d-957b-44d5-15d8-08da5ec7acdc X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2022 20:48:11.9672 (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: Xaqd7fzkiZTBZFKUaj0UZsYQhBVuQyKaVmwVVeU0BS+DS8mPBy6lLgRzi/JBFt/kDMz3hTR/T6oVuzWCwDyGa6kaRWkeDl05SufZORPYFkM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR10MB2898 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.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 --- 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");