Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp263650imi; Thu, 21 Jul 2022 21:20:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tqoWLeq5tRT1VoKqZgV57tP/Toaornd5kOEPsw/3HyhF6c5vnL4y6ldly7NcVqCG5bqesh X-Received: by 2002:a17:90b:4a12:b0:1ef:a8bb:b475 with SMTP id kk18-20020a17090b4a1200b001efa8bbb475mr1952147pjb.124.1658463653987; Thu, 21 Jul 2022 21:20:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658463653; cv=pass; d=google.com; s=arc-20160816; b=1LwUfuPOQLmDKuhcA1R4HXd4zdpi5x569ZeNO1JjGM8otakfzoKy21txvTqvtKyJc/ GxgUPIWUCTSCCnOojRIlBVIKxvJZSKtHdAQVFTQRNuHkDWrNN0wmiCgifpWyXOP1+Aq2 Z3Q7+hijmr3pzFxSqQAfp8E/G5CpK3NTKluBuPGNKzsl/Po/xYx9lSpPW9JHY81HcbVv aQnAzoeu5J6WyW4DHydy/+mnnelQp7LDb9TrOOdJuaCVMTEWDhd0IJf9Cg4Fe5ehieya AOoUiCsfKS+c3v8hu81hAqhFS8M2f5Oi6NfKWpOjACmk+igg99uJ+dG3bWlQ1sqkuKcx HrTQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lafS11npwB5UTfmFr3JA0o7GOe2aDgah3CQnMORekVQ=; b=dmG/qzv0SY++3VMRtlXgYQ+uP2Yi36cNb5eQrqRY0WU5ZBnLr/jDNKvOxt5nyamGCG 9RKkwLEB9hH+d/GIicJUD8Pp5th8CEFQ6udHGm+v3C6YSUkzFq9Bmc1LdIkIgSsluN4N lQtpEl/THKvWKj4Ugi1btuGWxb+7X2MH6bAFzyIjUIryb4K2ZFOOk5LCxHcO3O2GXRB+ mcBSLiWbexd1gkuzRCYH4IjLiW/t4r0VH+b5gQrbWzOKTKdMLm3O+F1DsiSz0u0SfmbN Jpw+VadPNowaR9ktsY3k8G1y3Ed6NFFN+6paWyhRvcmurf4t43IKbZPKJmrcPhkRlXRk /QoQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=b7a50q+3; arc=pass (i=1 spf=pass spfdomain=in-advantage.com dkim=pass dkdomain=in-advantage.com dmarc=pass fromdomain=in-advantage.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=in-advantage.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o7-20020a056a0015c700b00525b44e124bsi5343792pfu.259.2022.07.21.21.20.39; Thu, 21 Jul 2022 21:20:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=b7a50q+3; arc=pass (i=1 spf=pass spfdomain=in-advantage.com dkim=pass dkdomain=in-advantage.com dmarc=pass fromdomain=in-advantage.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=in-advantage.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234273AbiGVEHQ (ORCPT + 99 others); Fri, 22 Jul 2022 00:07:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233803AbiGVEGf (ORCPT ); Fri, 22 Jul 2022 00:06:35 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2112.outbound.protection.outlook.com [40.107.237.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC9CA89AA0; Thu, 21 Jul 2022 21:06:34 -0700 (PDT) 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> Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: =?us-ascii?Q?GOtDzABlpqXDh+4eG1oWK2sOZLcYx0f2rgSRK+1UZcdVzVLzCpzDfkGps9C+?= =?us-ascii?Q?kj6U1e4jsLvwRxsikCJcImssQ/9vFp7x9TGeOwZCC5mzbrIIY0rz8ZzQsJJu?= =?us-ascii?Q?eG4GzlPKpbSd8lvz0prZDUn0gjFbVgP+KgCm1VoQssU1TONUroXN4gnq214p?= =?us-ascii?Q?izA1R9hUmUGRwPLwdhW1hwHhiw8kdwaFYf60trbYRgnxYollBQI5+m1Hkr55?= =?us-ascii?Q?+UnrvsaJabmNdYvTk6V786tztCUGdZHqlrCoJ1Z/Ij6Xv6ippilR4m1JXWmi?= =?us-asc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9gH2W5XzQ6FTOzonfnFMyheOfVLOS/g2?= =?us-ascii?Q?yV1gou9rqfJG9ZR8wu97StHVmL+PQ4Lu5DaeP2XBbVPtnvk0nEpnn4QRphIw?= =?us-ascii?Q?/NJbHCt6vpilz+4LiBkGlND1VK0+71Io5ih1I4gQK3UzB8+7RyXEtnmq91wP?= =?us-ascii?Q?UvJwRDnzfn68Hg7t08A9WIufwIBAWad9qIXlerjuJ4LTd2c2sCt92I9AJ26T?= =?us-ascii?Q?zCi//eEP4d5M4GdLY4VDHJ7hYU3f0X3S/HD1Get1vRmCdL4PsNzpVnz8XURo?= =?us-ascii?Q?iNM5TXDeQ6NoXDQqxek++Dv7MVaF4wIZcpXXZaWIGMQ0KHW2QYIg4OcHitvd?= =?us-ascii?Q?x0GG60PMiHkfXx2kdxrMwCWNUEUbTjdgzwyctdJLGzUxbi0+OtxgvUBB0FrV?= =?us-ascii?Q?Gpa1m2MnV1xEl+C69IKG2sh/Z/reWWjUVtS/zuCW66wYT9I0QWpnStwpX61Q?= =?us-ascii?Q?smgVqDW/FEoltY8xFJq3tbw=3D?= 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-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.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 --- 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"); -- 2.25.1