From patchwork Tue Jul 5 20:47:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 12907011 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 11FA3CCA481 for ; Tue, 5 Jul 2022 20:48:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231926AbiGEUs4 (ORCPT ); Tue, 5 Jul 2022 16:48:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231898AbiGEUsS (ORCPT ); Tue, 5 Jul 2022 16:48:18 -0400 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2094.outbound.protection.outlook.com [40.107.95.94]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D735711142; Tue, 5 Jul 2022 13:48:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ls7ICjpjtInlTfCEcKKiQnwt6Abyx2EijSE6i79B7boNRqjHvsatZHRdOe1DLtFj1bQbhTfz4b2k5H1OhW7qBdL/WIvq40Yfg0rHgGvXlh+/YyzHMs2/9I+Uspj/5TgDB87AS2yLFoLozkTHjXClOPlaItSl7GIMkbgEP3m4mb2Jgbu7twRfzVTeffQQr95ILvDCZOeWnQKUkXVp4lQ1vLGwzJpfDUtvc7GBG1ATvEH0KRBU3ZNQ5C0W55lUhGjSNjfKC6Wt84ArNTqdTTT27hRXz8p0Dp2rcu1ZN9NgsUicK130Rj7Fm0drJJ/owm6LrdNJShPOT44YEi4aZDXlqg== 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=CDtdjPOljDaYnS77m34kA1EJPU4pciTzcmeMhp0u6n8=; b=I+nkPTLIwVOE+xAuVOixdUsyHLdZJahddzCWZU3EGIQTEJwSFu4lSPS50+yMx43H+X03qsZA448i3PB3RbEdOfeMVsGGtjspB5KAqldzd7w5gdCEvm8p2jLP/iDai1yZk/pawq+GUwsIl50yGD0A2s9+GkiKtRcdoy++Ni4b1DpYSWPLj8h9hieT353ZfJwO02SY9ZEztBCMi+drVZPlZdeVdN7orzLzL7Fp1zBfKBJsNMNfueAbgp5DORWA8IOJukRzIBNvcP9yTrPWl+aU3Vmueuq1+J2I0vPeSFIEG2KeEAJRbRpBckm+3YxVENRlIPQcmrrtYOqsz8jqMCugSg== 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=CDtdjPOljDaYnS77m34kA1EJPU4pciTzcmeMhp0u6n8=; b=ZkN9jQLEUcgWGWC7HMDPZXm+FZbjcO9mGfaHbjMTXJI7tSd9roladLtZgZCS3DhrykODGHX/Pu98ryyVi0P4fFvCohOVG9cNivOom7FgtkuWB1cTeCUnAhCKtVeaVDNe3uc0pDg3BH+ul31mZqKmbpmi7cjd4wzE5424zko6wKk= 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 MWHPR10MB1934.namprd10.prod.outlook.com (2603:10b6:300:113::22) 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:13 +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:13 +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 5/9] pinctrl: microchip-sgpio: allow sgpio driver to be used as a module Date: Tue, 5 Jul 2022 13:47:39 -0700 Message-Id: <20220705204743.3224692-6-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: 69ee0b59-b305-4639-7ecc-08da5ec7adab X-MS-TrafficTypeDiagnostic: MWHPR10MB1934:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IwguaRtskkT8sHO2JMpGiBi/qz/asgnsuDrOSiAqy9HcIxjqy5aeCv71GGKNezoGNMIoGjHtVb88rPjzQdTw0S/XkypadVB/9wq9UxlLoDVThQQkOzhAggihzqWPTQE5PfMVKi0cNGew2UvzHEYT02cw67x3m6IstauDQN5ITquU35vTZulsHI5kcrYG13i67v3UrOHlB1L6g2HX2TKw73lNleL101MOzPKEhurU3vYjtdhU8b+W693K7Z7VJdfe3nvIf/8v0UgzH8n4f8R3/cwFlQ7EFOdLc8BbUmqL1Oc0NyP8D9QUrkSauHXDUWo6TUMrMQZuLnHQ11zWOCJxpOzmNEJkPmutCBcEMCs4jwKMzplPEzLZSum8pLZ2RChfI/PWvKKdm+dZtpitGCBUP3xb8Ukx6uHgDpbNDaTO4muihsrEQsW/IXceoHpOM6AOXaPO4bETsSfZqweIebdsda2KeCH7rDAaaIKbFKe/IO41LMMZtwng5X7Xlrs5OtyVsTPX4gl8DOkaKLANRAep94M4raSMlZwTi37+G5mKck2Y79o6mDgRcKG3rvkncG9qTEOHIDTne+XcVM1bxs4U02ToDVXoU4WCKXGMzhFPwKkbORPyLbQ+14s+uKLpz4rKi8c4OtJogQFfreVThlebyl3jCHasQDRxQC//DajQIECRTrXwzDtFfofBDhlM/70ptFTXaoZGvMPGIslgMxs70h9YMheLCnFuDGuIJEJPkC9pejePyV/XdOUCWvEFLAhQjQlTsREJKEtP+Xwh0QZnx7ws4DbbZkdTlzeNwdrdOKg= 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)(346002)(376002)(396003)(136003)(39830400003)(366004)(7416002)(44832011)(478600001)(5660300002)(8936002)(6486002)(52116002)(6506007)(86362001)(26005)(6512007)(41300700001)(2906002)(6666004)(38100700002)(38350700002)(2616005)(186003)(1076003)(83380400001)(66946007)(66556008)(66476007)(54906003)(36756003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8ky0TYf9Usaz7MZsgrpzpkYAuDSjuX5bD2IpA2NvwOCIJl9IABH+eelss0opI6GhEEw64GZaKzYNsRw2cyqF2EgYo7j/aOkooxZRmuByshTpJ7GLnvODH/6vkeBHk9kyCwYqNBEQdZdPB3UOGOatJRvcTYPBK7WFId4hX3HjOU9rdSmClvQl5uapeLjE/Y55yRG/XsZPeLlV8Rbeys8cqQalTe+zi9bjU73cazoOAHucfg6nyaX38/o3Gk0R6hP8K4bxEUpxR0CWMiJHrywLalQOvEoqMNYQPuYLDSYnnaYeF/OYHcJOsxMTXAXyatark5/lPa4QKf8h79h1KyEHg+Awd3bdr1JC2CAoTKRn+CEWgmazaNdadlaYXRNHgwF7hx+r4WWnUbUyGLfxXi0VbUL+8LP96KR5qsbHFoE2gVAM5JPYxdV3tCJl5Txpfzp/N14gbu6ndYJfMVh6R7aYOcP1D74wQiJkuPiHMWN0UHTcVoYCHvGyxFazRzLag9z8m6G2TEH4rqb/RxrJAGE/mHA0X64m5mJjaytmK7MhwvQ17dKDCqMka8wDJA8yfyAA3UDTpT9XMwZLp9Lx/MUFvZpVQvvXsp+TMuBigZ1GYt+WRmEDXEgToYFeRbl3o0qw== X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 69ee0b59-b305-4639-7ecc-08da5ec7adab 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:13.3577 (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: fZYaoK+J8KqIako23iHHmEGtC2pM+tfyijG1I85DKKouLaxH1yqXLixYnZQ5T1iADlAWY20foOJ6dsHpaelcg2Xagxv3ei7N/a5ZgxM9Kmc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR10MB1934 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org As the commit message suggests, this simply adds the ability to select SGPIO pinctrl as a module. This becomes more practical when the SGPIO hardware exists on an external chip, controlled indirectly by I2C or SPI. This commit enables that level of control. Signed-off-by: Colin Foster Reviewed-by: Linus Walleij Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean --- drivers/pinctrl/Kconfig | 5 ++++- drivers/pinctrl/pinctrl-microchip-sgpio.c | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index ba48ff8be6e2..4e8d0ae6c81e 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig @@ -292,7 +292,7 @@ config PINCTRL_MCP23S08 corresponding interrupt-controller. config PINCTRL_MICROCHIP_SGPIO - bool "Pinctrl driver for Microsemi/Microchip Serial GPIO" + tristate "Pinctrl driver for Microsemi/Microchip Serial GPIO" depends on OF depends on HAS_IOMEM select GPIOLIB @@ -310,6 +310,9 @@ config PINCTRL_MICROCHIP_SGPIO connect control signals from SFP modules and to act as an LED controller. + If compiled as a module, the module name will be + pinctrl-microchip-sgpio. + config PINCTRL_OCELOT tristate "Pinctrl driver for the Microsemi Ocelot and Jaguar2 SoCs" depends on OF diff --git a/drivers/pinctrl/pinctrl-microchip-sgpio.c b/drivers/pinctrl/pinctrl-microchip-sgpio.c index 6f55bf7d5e05..e56074b7e659 100644 --- a/drivers/pinctrl/pinctrl-microchip-sgpio.c +++ b/drivers/pinctrl/pinctrl-microchip-sgpio.c @@ -999,6 +999,7 @@ static const struct of_device_id microchip_sgpio_gpio_of_match[] = { /* sentinel */ } }; +MODULE_DEVICE_TABLE(of, microchip_sgpio_gpio_of_match); static struct platform_driver microchip_sgpio_pinctrl_driver = { .driver = { @@ -1008,4 +1009,7 @@ static struct platform_driver microchip_sgpio_pinctrl_driver = { }, .probe = microchip_sgpio_probe, }; -builtin_platform_driver(microchip_sgpio_pinctrl_driver); +module_platform_driver(microchip_sgpio_pinctrl_driver); + +MODULE_DESCRIPTION("Microchip SGPIO Pinctrl Driver"); +MODULE_LICENSE("GPL");