From patchwork Mon Sep 5 16:21:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 12966494 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 CCD3AECAAD3 for ; Mon, 5 Sep 2022 20:00:49 +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=uDXC4xFxBx252mFlL/ycKvEiTYJm5T7oUoop/XQwbtU=; b=3yJhlozvQLSI/u edygKmxz1KCp0o8F1Jd0torND2TDBaiQJsC+JT3QtRgKmY+nPloM1rE76nP2Sx9vtG5Rbq5x6/rH/ IcBudVoDkjv9XjpkxEk80XPbZJDJcrz2l7+2LC1TulGdelcc+e9vgpCoU5Ywd1w8s8ZUXC/ZwqG81 j5G6NMB6XD5cvVXMNQax60p5MsjvxlyG9obOqA2j6AO2VQt4/fXltHBXbaMLeA60MDlFJW8JPofLe scLtRE9K5+wxxoe6sFeGOtY7uXXHdTxbziRSZ76JVjqVHvS6FXRMgykXmVG6B3fGvdK8aXyoJ/DKS teT1qLVcQwZ9hSPdiP9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVIG8-009pg4-5r; Mon, 05 Sep 2022 19:59:54 +0000 Received: from desiato.infradead.org ([90.155.92.199]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVF1H-006tVy-8r for linux-arm-kernel@bombadil.infradead.org; Mon, 05 Sep 2022 16:32:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=T5opAq0Wal163efo4bIJB29QMAdu4+IcusfP/GfBH4w=; b=kQr0xehVDCtT/Nx0xIKG4miJzL egxeychSShiOAKnuSLrCdOvCMmhN4CIwwoLFEALeJ0r/ifS6upv1J8NHq9upfs8MxiZhCAnuGh5pk nEFoVkYrDeSPb/Su8SjPZQXTeWnUKbxzryhhyiOO8wW2GTAKZH+9TJAoYa+7DRJpE70/n6mz7CIQx JttMYaqMHagwV7AKQMNf8J4/CZ1a5/qzpiNrKjYaH4fyZI0iZbG5bscA2zUqpHDXNPA01aytuIqiH Y9Vf9hfGQRfW5cUmvSSaUKdHNug2FYDTxqvxGbm6yG93B2DbxW0sVRuGtt48HyfdIVRRK+Tcde2ev 1l32HWsw==; Received: from mail-dm6nam04on2106.outbound.protection.outlook.com ([40.107.102.106] helo=NAM04-DM6-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVErJ-009oh0-Ee for linux-arm-kernel@lists.infradead.org; Mon, 05 Sep 2022 16:22:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RBqDV5xJlgiAjeWxk1CRnu82KFzGoB53iqhWxqHhur4mn++d/VxA0+v9erI7XNOUbepjlc52VM6fp05Cnfb3UeGG8A27wwWDt0sjBhMSm1SuoxeI5ungqjhxC6cPN2yUfI1F0oTnzXwp6vVwxer8FAaljejKg3C2S1oZv6bx2PIgvQOCv4nZ2dgVzf9KuaLbGbhwxKIRFCkO4wRO6hl1cw9g5kJg6MxWHxcKRpoJDt0vw6jSY3f6ebZsPBAytTNrApymrJr93+VFSQgi2/iTtykgl+4UB2vGmsxb6rqhOUZ8+fyMBzwBOZroBhciHqPeoXgw2cl+09CRabFXfit54Q== 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=T5opAq0Wal163efo4bIJB29QMAdu4+IcusfP/GfBH4w=; b=na6ehR6xLGVQkzWDraTeSncw4RdsxA5KhtLdsvAQMRHEiWmiCT4GESNcSLInS4MO585L1cNffyWzsZ3IoQNWVKdm8VOjjr/RSuZ2v9dM6ajWUOMEoDcp2bcwWlKv6erGoj1FoBtMoJwm1kOTAkFAbx5nb16TO+l8vzuPi5lIevCPkEN7tyzo8J2nb6/l/XTRm2mNiENqD49wxdGsyOQBlCr6TwnCJ447351eFaCn5OM7UdddfccLber0maRdHdBlVCoZNIF7mW6ZILQ4LgMU1lLGy/xq2LqKvBJrbqqWwqBvtAkphvst8nSSr/biIODyb7PkAgW4nlinMVyuAndbZw== 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=T5opAq0Wal163efo4bIJB29QMAdu4+IcusfP/GfBH4w=; b=eRI0AypvgWBLufg9EBhe10/OAJpu8dzPTsDbUbAYhOmj2sK74kEUZmMiGBY3VG8U4Fmft+L8xOXMQAJpN6ixyNwbftHGKFmG7V1Aa4BHayS3h7VsfgCFnUtJt8L/DWLBgei6MY9jHSyU3F2kav96JdPleU61Rr270enntuYS1VU= 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 PH0PR10MB5848.namprd10.prod.outlook.com (2603:10b6:510:149::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.14; Mon, 5 Sep 2022 16:21:53 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::38ee:4bfb:c7b8:72e1]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::38ee:4bfb:c7b8:72e1%7]) with mapi id 15.20.5588.012; Mon, 5 Sep 2022 16:21:53 +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 , Greg Kroah-Hartman , Andy Shevchenko , Dan Williams , Jonathan Cameron , 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: [RESEND PATCH v16 mfd 4/8] pinctrl: microchip-sgpio: allow sgpio driver to be used as a module Date: Mon, 5 Sep 2022 09:21:28 -0700 Message-Id: <20220905162132.2943088-5-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220905162132.2943088-1-colin.foster@in-advantage.com> References: <20220905162132.2943088-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MW4PR04CA0263.namprd04.prod.outlook.com (2603:10b6:303:88::28) 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: 7e0f9bbb-de08-44af-1e9f-08da8f5abe47 X-MS-TrafficTypeDiagnostic: PH0PR10MB5848:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nIfGt3v2+ylqeZ9izDQHzHaiIrCOXtk5rdur6claQXHVJ8yW3hCRA3qx8WGsZ5TKzTy8UklnvGjFKZkq11ZSNr/85E7FVZKar4Ndx99IetYKb0Jlz68qxBFDo3CXzA7ltBsyqpMbj/Y+H3mnKxdMcX6aD4I9hoa4pPZaVfj7MBkseElTMNwC6rM8jAdbIsAFKYNLa1WXv07Ok99K3NLn4AU3khQYRfb4KBMXvOYva6+/8Q3rfk8pZkvDB29qKXZZNwdGYUJhfEsNa/lkJKUFNJsDboHlc/s+zm+JylKGmseaeBrBhOsLL41vU+qaWhtC4tl4fxgYUyoFGC5pHH9eGaoQXG9BOvyPzLyzPaE6L5J4QQ4eCdg2/DxR2Ss2Gv58PqrlcJzUBW/VFaLBcAAhFpSlbh/zfqdZBQk2+le4OhyORyUjXU7+BqIcND2OPGkyZFfZYltEWHnMXPuG48db3bXKinSl1LD/taEoQpyOCBdWk9eP27AzZ+DsvnkjFpXQ2rjNr003X/q3C/o2RlK/i3qZ6btGWKK/AZwaxtCVfYetEh6VLfrIs30RtVsXyffawAGxyv2v2B2dh9pRfTtt9M+QUP2YkrEalecG94tW+oYgpCQlLacvtljJJIWnzsZ98zT2nlG0Y+ElLEKz+zGDUxXIJ+R1FMBXLjKZ8g3hggZipSuGjKjjFcjOaZt27LwX91NJixP3/gWE24CTfIzCyF00ODkUDBZS2I4Mv4GQGI54xNpQWDvRkiykYh7s/9OR 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)(396003)(346002)(376002)(39830400003)(136003)(366004)(66946007)(5660300002)(8936002)(66556008)(54906003)(6486002)(41300700001)(6666004)(52116002)(186003)(2906002)(1076003)(7416002)(2616005)(44832011)(6512007)(36756003)(6506007)(316002)(83380400001)(26005)(38350700002)(38100700002)(4326008)(86362001)(66476007)(8676002)(478600001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KXWebID8Zsm0EBU7U5EhUPnQ1SPvle7Ei78vas6nsubC18fINTkjL8EaZtm5+4jsBLz7ZSvg/GFoyYMZufFkGnb1LE1jB7WPnv2/Fefl29+/Mx0VYdhE6UmwtoDAZsYxxd7BYkZ/E7a8UI9MnVQWq0YB8h4xL4IL6lKC+nM8JWdDqavUydDbAB8pOnuRuS6ATydXYQD93IyHqjIjf5nYN1TqKHvzBvBdPp9MjjSiM13yEsio679GwI2KWN4GvClchAjF71zOxf5ydtImNOyyM31ADGZmwajXKqFrgZejRMA+dai+HqTELUQRYX8u9ccWQ/SdsmZpP5WIzK78Xq+iARN75Zc/U/zYQc7W8vc9EjPJR2TRKZD755cshOfdhHtqD2+jKQS8GZj7260OM0VtIGs7UN0mrJ3ikFZ2FEyz0DoFx4hb+kLWj1ZETHtTNNKC+LEoL6D7YKtZx1+6WFlJJv5Xr03BXC1pujWzxvbf64qsNgr1aSHKdGHCwqTdH29XordqAiGR7pKjT5ANNpaiBs/a99/fV9PVTmh8FWmP07zbmgBm1uTv1Y9K2RklDr67b7f/RRYrpIWinFFe04m7O+dnuz2a4nyH39iiTcyFZMlYy7tpDLaHq3UQvntOuhD0qnL2WHS+hj8A3dgpIetEXTNWWCMq9fUrDICzpVGzu9q9JlKZNL+GM+q00bUFNG7mRe9PaTxUaSqsVhdA3swq7/p3oxRHZKwyrELHalKBjFUZNtfuKiA/hdaYDXKFjbdxrwhUmOJJg11qCTqjarHhtP6Q84pBmpkjehX3aOGWV2qlwBrYVAq8Hfpmb06+EwfiB5pSflx5tLw0xdHoGVOz/87tAWWDLSKWPytkGBn1KrA5zrcp1Pfn6jT8xue/K62+YWZWMznPR/M3v871klawRr/F720v3BWgj7M0lQqF3GbyGYfklWlAS9t8kmH4PNOS3Gon965ckpkT3STIsr/IeBTirrGk0o1Ts2vZ7D0NEHXFQLWvtr11OcBjxJW4xDeYeqAajHUmhy0MSAjQTv4s2QdfRuIAEvc40xkZtH8GILJxqaGUzCsbUsRmV1IYW9Va6K9dVZULfiMcMKUW7vExyT9uRIuCK50IZwDVlBRQY073h5FIURzxYdbIaKbjqKgC60P9ef1/NOdaqTUFbbzrYydALgutLA3FyH4AAHC5SayX/BAhoA5jFdcNEmNmS9SLWIomBDIqffLu3ZfrcKolzBzpZKZmehT/yaXFRMtJlNPa12secBG8vNqGErfNSx61bvMgceATMArnqS6XRMOYRpZ/HPdmeRA9AGUOMq7VVxqOxX7BDKUi1PQCHoAtScjK7mK79DCh156W2h/Fuuoj3gnNpzQBs8KjN5QWunCx3TMI6fnPKOqXMEiNWHLl3M+DdPuoK7bhK26CUe78XG4CXtOYn2+dbZiStohCwi4fslQSg4IboG2Y1ISUs+nniG/p6ZyQv4aslK7dx2azL3k00xZao1ASvFhxTe5Agajm0sgwUTxfzoBoA9C5esspyA9Zwxo4aYHOta/qnBZOF7fMrPx/m8YjT05r1xvj77fgFk/UtLKla2UP9uB5gBzFmliUBbVnOZwz8qPx/twZ1/i0Yg== X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7e0f9bbb-de08-44af-1e9f-08da8f5abe47 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2022 16:21:52.9913 (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: DxMwj5GgKsquFZmDZk8vPAnxkuIsDXFzgbmEQNYtqEDNUfJLjFqDw4tVGrgTX/rv4Cx/bDwa75bPjv0uGYspkg2pfuWjsdxzK8JyeJxOmIw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB5848 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220905_172201_565846_9300C1B8 X-CRM114-Status: GOOD ( 14.30 ) 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 Reviewed-by: Andy Shevchenko --- v16 * Add Andy Reviewed-by tag v14,15 * No changes --- 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 1cf74b0c42e5..d768dcf75cf1 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");