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: 12907027 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 8B7B9C433EF for ; Tue, 5 Jul 2022 20:51:16 +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=hs+NwRMvL2AMr2u3v2P4HR8/4iRiuju9dINVtnI+ZZM=; b=H8f8YZXh8Smw60 2YrEl4MfJpInL6RuPYSm8/Dsht0ulshtCpDVcHaXCfT6hzHVXWRH8qVpy27urmZVsf0wtyqRaqFfI 4t/zJajGlcArwbDWDCJbILM76SUp+G+YSuognbD9gJI3XCaqJ2FrBzMsYSr3Jq3xMSs5LigYFLFqQ 6w1eO434JdOst/Y+SyuIOmVqz6/QooZpB9ej3eTNv9TJb34yLJ9GDBGoMFdm2jT1dLE4xn083yDe6 T8jdLP94uVrErczu/AKGSnIQ3i8ZnZu+lQX2Z0bzW4oUhR8FrKGx7iMS1LlBqvg8FPw09jj4NE7zM 8Q2ualpVJ0qlf/r8F7mA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8pUj-002iYk-Ew; Tue, 05 Jul 2022 20:50:07 +0000 Received: from mail-dm3nam02on2119.outbound.protection.outlook.com ([40.107.95.119] helo=NAM02-DM3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o8pT1-002hbc-S6 for linux-arm-kernel@lists.infradead.org; Tue, 05 Jul 2022 20:48:21 +0000 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)(316002)(4326008)(8676002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1UWvWVEbRpzeB3rZdsL12wntZVIGiuyU7ucDqqeptAtq6+RhykTn/0f/N7whcaXMN4t6kYm3v4lkLWIRhthC1YVj3niIWSAQkKV1NUnCjnvunYSL4V0/FCeZJTgIeddL4tj59Fe/5Ow/WR2xBKzZaZ7TOyRdxqsURMky5+OZFLBcIozzPqdrgpfO9y8FGEWUKCAoAq5OktGbgwTZ2wyA6ElqJV4FTxy91K1WzRHstWChAHrS91wfVyZ9YkfRVtE8i5iV8IMMFOI1sISNZrMR1SI8RySphn3hTEiXN0KPgYWWR3rbQL+YS/g5vn6zTrrVBMTWYHCb6v+t2lO4v1RS+JkQRoGpiXm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/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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220705_134819_998979_0177CD45 X-CRM114-Status: GOOD ( 14.39 ) 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 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");