From patchwork Wed Aug 3 05:47:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 12935211 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 B15E8C19F28 for ; Wed, 3 Aug 2022 05:50:27 +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=T5jju5TztD1D63DNLjvyDNBRm5xrFSus5kJ/OAmLBNQ=; b=kBhggHsfrtgURd lzPACs33Npcl/6b0inJMadKQfNNQr6R1edwTSrxAWEMuAvOdtgKdq+FnJSaZlj7pT5XgDxyCMmKmp JncrdZekU+YaRerLhaWPth1iuPxlk8gddnqgj3oWf92NQGck28rCx4drN3mdPi+LrD+P78mcz9Ntl b9eiShc2bKPJqN/yx3x8i0B9KmQ4uv323cUIkjdOmmp1LoxcE8fftiIJGmGf9nrrgve3/ETyv3IiW kpv6kTz1puDUvlu0T2X5pmCFBfbMBqLrgn8g8vxFIlD8GPCyeGsGHg9hdOfyy9O3dGAH6ryrpKP2k oZ0bQGB1uEsLlQNV8XCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oJ7Fg-002pUn-Vi; Wed, 03 Aug 2022 05:49:05 +0000 Received: from mail-dm6nam11on2121.outbound.protection.outlook.com ([40.107.223.121] helo=NAM11-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oJ7Ee-002ohk-BC for linux-arm-kernel@lists.infradead.org; Wed, 03 Aug 2022 05:48:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BWQskssOTaTB49pbXOTP2eq5ODVSX4xij9CGkkVoKuuxG5zM3zjKmg3nNwvnAqY/YWGR+T8UpNuI0OSPifCXmVxJ+0VFjJKccWdh1AcW3EAe/J7HpJLaOkoUjc2snyeKvuzq0jr8WMUurbGy57ZUmvIYZvdk27Hex05meR5OL8nhmiDIwMb3bZFN8FHqNKBYBcdqmXb3Ae8GVfJKxUfLJ3GMPDErZagu+MPeuK99+VvVCdfXrzvw5w3+m8pZu5pSnzxQY18GhB/Yu7xtAZ2Xgvljta9N+IBgMsHmmjQPczNMt8AbEafi2RJWQ2Vkett28m2Ud+RcJPt6WU+7OkEpsQ== 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=b4iqxIpL6SYkOcLWwCQPALRq2mAuAYQ0gxMxQkH7C+0=; b=HFPZE/z/16SQLYnhyoX9MfokhkOrfARRdUfnaPMwyrYuOEx8ubISBvvrNaomVmSpvinEiYzKHChLHKLUKIXOVPAHMc0vMwiF1Jphxm1HrJ4/NVJeGXCA6Btwe/t+gcaEsRnRDJeWpxif/0e4OXrQGIzTNw7YfODv96x2H2SISUsbNi7QlFc3PlNCn3lJNytUwyixd8OqA1lfbFksEuCYi6rQ4mEQgMBTLJ8/uQeul+bsyQbT76Op5e4cJiEVKgRsGa/oN6w1trbup6GC5j4UmOxkmIFc1G8irUX78bbUFmwWqALwZKYuSXortEMSCbY1vFxXtzbms0jlWMKP0SnlIg== 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=b4iqxIpL6SYkOcLWwCQPALRq2mAuAYQ0gxMxQkH7C+0=; b=RIgaBO4Fw0jr4nLKM7Oe18flppC97CmS19JvIPl5HNx1jomIhs1U6//nUe6/h0uQsSncPzrfL4H4bV57lqPjy/YoYG1ugao7Jfo7bRAUIwC53HopkgqtcKl8zpGUxGBoRbF/3bAnvBx6/n/HXdKa+CKKuckJcohf8RNFuftllG4= 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 MW4PR10MB6438.namprd10.prod.outlook.com (2603:10b6:303:218::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.14; Wed, 3 Aug 2022 05:47:51 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::b869:6c52:7a8d:ddee]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::b869:6c52:7a8d:ddee%4]) with mapi id 15.20.5482.014; Wed, 3 Aug 2022 05:47:51 +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 v15 mfd 5/9] pinctrl: microchip-sgpio: allow sgpio driver to be used as a module Date: Tue, 2 Aug 2022 22:47:24 -0700 Message-Id: <20220803054728.1541104-6-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220803054728.1541104-1-colin.foster@in-advantage.com> References: <20220803054728.1541104-1-colin.foster@in-advantage.com> X-ClientProxiedBy: BYAPR01CA0026.prod.exchangelabs.com (2603:10b6:a02:80::39) 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: 5e55b853-e4e9-4e5a-d502-08da7513b3db X-MS-TrafficTypeDiagnostic: MW4PR10MB6438:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: toGplqpGfOBdJ3lmz1Mid4icS6eIH7WIEinVxaQ9SU7mdo29UIWr2dO0pzh7jsAAqWdSrnA2jkRaWYUasf+6RxXHVY5oZt6yUilmPE3Pntaqo+sHOIFs0rggdz+vN6OSc5QUKLlirjElGdvGg67mKRJbz1OfYe0/t0RuUf426yjJwdZhRqrZh8AI+JjZbyi2INzL6CJG04gsGpfTLZ1EuV751UlDWKBhE+qMC/OSArgvQNnSdfJ7/ofecIpUP+SCIsy2aPl9+u+Uq9i5bqtfnn3Am5BSc0SaDKSqLd3mCboW76ZbTaru9DKyHghLIgGs89qlBETfv3ToHQSr18f7LWI14SClllDvt73ioa34Fw4IHWY800tHyuF1JdX3rSLl54AOm6kvgo41rghJenzYndJTAbWQ4OqEty8XdkYtKme5V/1UBqmdRDDaTY0tT5rNNJteNZaO7UEiP5w8GiEwbpdBPzuoO4vauSIOj4VjxKi+yX5P0YsQlaW0RLzRfnxReSDlrl22NOpz/6N5ZbCWPFos1OLpxyhu0NX6jS2XhTrdMPqIwTp1Qz2PTnURJkjAxmo3UWzr/HVAIF5Lw3rUU2M0VLeJ0ta6shmTtq2zGwtbIoXLJDziP28lmGhSefMis8mrUszsKbBxhsofFMi8prDEAvEPB3hgOJ1dgxlUmG71BRqTKqjePizy/buAoWoMd7HE5g2tRRZ1iJqSk+ozKU+NXLFp8p4LhhWPzt8usfSn2ffcaLFGWoOwrnfQqgOLoI9wiMkPnRCaIz4KtGaHgt7tOSGRmz8Tylfx4ahyLzQ= 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)(376002)(366004)(346002)(136003)(39830400003)(396003)(186003)(41300700001)(6666004)(2906002)(6512007)(26005)(52116002)(1076003)(6506007)(2616005)(38350700002)(38100700002)(86362001)(83380400001)(5660300002)(36756003)(7416002)(6486002)(478600001)(8676002)(4326008)(66476007)(66556008)(66946007)(8936002)(44832011)(316002)(54906003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MY3OkDnpyfyaO0I4fVzqwvWsM2Ki0SPIndn144Q58xKGInDofBwTS/Wq93A9d8ER6tLnEjcxn57+DvnYY3eTqWnbgnY2jtK79vZLUS3soUgpki99NMbE0p1yQOLooFxYPH8i9FWxO4oiJ2DbLZmDLPM64EhGySDqnv1G98eCsemUQbj7Z7eMVjYsKOlZcGsQy++pCp9VxBfh5yA1iyeTGceZvgTteQyqIV8WEwRgaEIz2LUv5GYwcHmG+vIgEkt16QxbZ6PAhheiILvhr/wLZZGw965qqSVhmtlUAulyLu2O53CMmwutXlfvwN2jnJ6UjYFy9Vqikege8zQt6mW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sgL6+AjUmwxiB28gon8iKBh1rmLIm/TNQFyz15xJuZgFMAvFdbKj3J3JY336r5zHMosf2aS99qf0JHOjNER9XDhom43vg8UCH9Ol4A2IEyCLbywMfLuDNhL/S6e6myKR4ya+6FUxC+19M6rNxTwQLxiTZ3AxEduO9tGJhlZpmM6uhg+Fp01osHoejZCBItW7d1Frnj2IqOtE1QA== X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e55b853-e4e9-4e5a-d502-08da7513b3db X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Aug 2022 05:47:51.0422 (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: eoY/vErf1ZwTIXtE3trUWpM3GWF1pmxND+cEuextDuE+rXa5DZ4+swxmGi4PhMoLvBWSprzhe2YofQzsqtaB7OkG5t1zxvXxyNY2kBpSi0s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB6438 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220802_224800_443289_3465EC16 X-CRM114-Status: GOOD ( 14.79 ) 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 --- (No changes since before v14) 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");