From patchwork Fri Jul 22 04:06:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 12925955 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 865D5C433EF for ; Fri, 22 Jul 2022 04:08:38 +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=P0FKHZuzXgHPPYWWXpgmDc2K5A2kNddSrhW5NyQG+Po=; b=wuOoUrwGG8Evjv +BAfmSxSwXsa5NhsPOufM35jJsb6Kl0nCZTs2jp87GgoSfN78Ximnt3GOIkPCnJcm8pvq6fZwhPJ1 ypfuM8hr9VlZzoOFC+E8w93FeMNyQcVmILVFuhXlUSGWJ6ynTqI42WoJ0bzBz2w3PJEsgp2fqdibB Fa5BfAQ2gA0oeahSvFk80T7vBbfdraUDLwkCXeFRdIj7zoUr2T746GCYPBNMzM+ZrkWX0ZhpOyq7u yTCZVKvEtj9tzfFIvUdlDYubqzspX6AxwuOUK/flqypwsYDgxVozzkEYM5d1pEFjNeHQjQJJoFAq5 nsCU7yTvKqFxzbh3F1lQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEjws-00HOCX-VB; Fri, 22 Jul 2022 04:07:35 +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 1oEjvz-00HNnp-2i for linux-arm-kernel@lists.infradead.org; Fri, 22 Jul 2022 04:06:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jJTXNFIUi0kJdetmSlJOarRXnRrVc65HA7pJf8X7e4Ec04fweK1STE0cW2MDz8c4jyBcsPzFq+fCkLqk1LIWJ2kcRD5iUhIHwvidNW01P99AriTWLuKv8e0DWfGHR/EHuW3NMhajoELUxj/sgXn2zvNbkX6UgKpkqrU8mYB2bYmucdgzN0lgIy5gIt6KKfE0POwQJJH/ERElc7bqtrwfN/pbDkCJlkW9qq6Vez8sqmnylUDAA6IcufPQDUcczeV2d5pvxP5WaNV5kPO8DUjWxkZOjTLwhjNT81+1gCoGeS7Se9qp8b3k3JqjrmFcFyXlQWPkOnubx6U/DU7ZPfz9KA== 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=lafS11npwB5UTfmFr3JA0o7GOe2aDgah3CQnMORekVQ=; b=jppbpzzUyp2YWFAD4xZSBsoLpb1ulPbadoruilL0i/PdRGrsKOMVHCXw3OekB0WIb8Ac/7ds89WkZUVJm3P0WQ2XwFIN9BypqlXGKhF/imYgnVpZp72URdZss0U2z0xISG5BR9/sFY+VTv747UOyTRBoWCQyc9DaQ7WpxJFITHucZzW2jbePQKMa814JYBcGvnpKyFaAQnBblq80WZxpaWuiTM25IGN/jdZfeQX4VGcqDeAnPFgFQDCcdjDEOKOcqwkOqvjt2+9Td8Iko/+MKx6YcG3rJe1sfUfKkMekoWd7CHy4EjOJWJxPQaCghBJGUFPkY6i7hwBRm30yJd3vdA== 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=lafS11npwB5UTfmFr3JA0o7GOe2aDgah3CQnMORekVQ=; b=b7a50q+32ZHIM/1bYsV0+DYy3nJig/Wx1PbEPI0+R9vuxjGqZc2t2D+Q//NDbvGE7mm6uudKw00GqA2txROdi13rV/Bt2V2+cl9JQzNmYkdRX5V1v/OpdgB2alD/fqRXkmdVc44CuPvTjQa4MVwrbgDy9lTYwCngLAuFzzKxMPY= 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:30 +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:29 +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 5/9] pinctrl: microchip-sgpio: allow sgpio driver to be used as a module Date: Thu, 21 Jul 2022 21:06:05 -0700 Message-Id: <20220722040609.91703-6-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: 4cd3ad85-b562-4cea-cc85-08da6b978d59 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: /DMMyxZQpDw0DGyg52M4kNjMJvZuzCI57YVq5Y9dibWnz6QycXkxlVgrMVtvgCCGfwXocmOPTyMi1NZMyWi1R+aWYMCHfSihIIE7DL2yeDJWEmE4to70pVEgQtWf/ByBubtlxgpEEudJ6xe6PbSHqR31d/8cR0inYa28CHgDV3voaGPtITRBKr+iZFaT3unNiqroCshCJQb13RDKLe24HZtNBeu92snalyf4BuZC85NVoxlxANsh59pGTPzN5ADvZ/ZEXTkXzDVI6g65e+iC52XMBN4zEydT3SVpanWnUjdvCLm8IhhG5+xZu0ncCIG374owuvQZLCOwiOjplfdfKmk0twewowDmb+GJqOQTdR+OjkB3s+MsUOTOLazYklojqYWGZbxABrhsk4aCGqesNgbhBB+r+SS0oCEUOSStif7QRO6IqdwbmBfYjGcGjS9t+lratm3ojZF9yuEq2exwfldX5gABlUeNQTW1A1Ki6ytA+vi1r3p0kaYU0kyCLqSwSCALFpiNjMqiEFlzG56XHU76MHC2FcSpeThULuqLhIIhtin0Kan6V32Im237FU/DbrAmopmfRt0+8NTXXKRBLQgv9htj+Zs5EhPkojA8E9HCfHrVrhh507jC3h0ikgfN98xjofc5RX62A9NKcdymtcLIJHL1s37UOwJLIYvs7Zcqln1ai0eA/QRIE99ix99onWRto7fAEFZFFxzpmfKU7EUEXiJUR6PqW7kuR3v67WXPqTu5qF+uStoBb1JAx3Oh53y2kujBV3A3v9CzuFtIMJL7MkD9qAL384RZ0WXsS+M= 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: GOtDzABlpqXDh+4eG1oWK2sOZLcYx0f2rgSRK+1UZcdVzVLzCpzDfkGps9C+kj6U1e4jsLvwRxsikCJcImssQ/9vFp7x9TGeOwZCC5mzbrIIY0rz8ZzQsJJueG4GzlPKpbSd8lvz0prZDUn0gjFbVgP+KgCm1VoQssU1TONUroXN4gnq214pizA1R9hUmUGRwPLwdhW1hwHhiw8kdwaFYf60trbYRgnxYollBQI5+m1Hkr55+UnrvsaJabmNdYvTk6V786tztCUGdZHqlrCoJ1Z/Ij6Xv6ippilR4m1JXWmiBezI5/nZAtJPQqDkL5a/oVmiQBaRhQvOP34QamHlQYntCOiVn0/zYUNnBh5JnDiakYMAVO9cN8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8XURoiNM5TXDeQ6NoXDQqxek++Dv7MVaF4wIZcpXXZaWIGMQ0KHW2QYIg4OcHitvdx0GG60PMiHkfXx2kdxrMwCWNUEUbTjdgzwyctdJLGzUxbi0+OtxgvUBB0FrVGpa1m2MnV1xEl+C69IKG2sh/Z/reWWjUVtS/zuCW66wYT9I0QWpnStwpX61QsmgVqDW/FEoltY8xFJq3tbw= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4cd3ad85-b562-4cea-cc85-08da6b978d59 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:28.3771 (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: ZrwiMYKLCsrx3MHBYjXifhS5qngChChrK2gpTkRgXbvIVxrbcYjPWJfxjGz4Rb9z3WMZQXNQY0sXtiK5uxBbrci/n9yieAdVy2710IcWt+k= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB3919 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220721_210639_148726_0F1E7DE6 X-CRM114-Status: GOOD ( 15.04 ) 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 --- v14 * 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 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");