From patchwork Sat Jan 29 22:02:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 12729667 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 3C9A8C433F5 for ; Sat, 29 Jan 2022 22:04:31 +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=nTa8il4YKPfUsgpIGqV0Sl0a+o0zjLd2vJ/u9ozhUYw=; b=TFieBDhDzbLXFf XeL7OtdYAKsguEdA65OHfsByA4ftjPa6qirEj0UhJubdRhE6YDYbKDYvJrywhzE1o+PPHFu4Sz2lS pVzSstV5EplsN9nvJu6bo28Xj7XZ5kRrMXkSSKMMAWFB24AGjNSZ3qaEJXoelw5s/KwxGMYGoomfr QQW7FolaAs+b8Lh/nN6+eqrJH5wV0tAMlNQiPJFPPvpYAkoJUC9Xn5QJKdBF/F/5XWyPMxtMRCghC SeFrCuIKOTr2gnDnEP8+MTKUG6CytFmwtyjc/Js9tSYQpCOaa6G3jQu/Pta4NZNcq4yDL9WjINstU UrwtVwa3tkd8RLkIF8hQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDvoF-005Twf-Gs; Sat, 29 Jan 2022 22:03:03 +0000 Received: from mail-dm3nam07on2072b.outbound.protection.outlook.com ([2a01:111:f400:7e83::72b] helo=NAM02-DM3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDvny-005Tls-0s for linux-arm-kernel@lists.infradead.org; Sat, 29 Jan 2022 22:02:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U2eek2g99CxNTl0KypgVpNH/9OX2nK290TfAAURCWzSGJj/gtVUShWTWbp/URqOS3btM0vvT1V5XPo+9ceONz9NzHYiVEWSpSRGxQVXXzHVz0GO3RREISarN6X5PlUvFrXi1QpjmSZlk64nLjRl0cDc9QL7a6tY3Aav1h7cczuR/wRvTwrSb8cpb/o5cO1Kee15Fe8ofxkXHegkvmvLZNdX7uS9GTGDq/KJVL87sApkxwaEcfUTrEtPNY0nVlJC3TM3cbzf8RWzM9R1s++te5dit/UKVdbDYsE7zEqvKxCADftM2l3b3uwi1a/pfg80PtylMi1BeHASCtIzVnALHUA== 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=avtWfeMglmtFD8xqIjpbS8FGYDBcMjNGkAW41+u+N9Y=; b=Vn0AEWSS0hsQz97EEvSaIi0qyXKt5RrBjC0/uWu2bT3dObsUfYiweoXwGs6tC+Oa4n9GEUKj5ZRE8oW30yOYPVMDGqc1E4zldgpjwQKw3NvxAIge/Z8zd/ebyHoojLsA+vyH5Z/2cJMScLYeqoHYSFHbzn2C1Kx+saetJn5jJDt9skl/OH9mbAjlTIzpudMmR9YKRxQsDwFlHoYORlLC/Fj9B+dkttSGjKNuAFRGGBMu6icy3Tv41kUsVjE5YjZ56/exW1jitOLAniZCXTqdv56M/JTIipMPo4uH1L+f9riwf8qcNsgVNNh5OVN1Aw09A2eURRjUBWFrHluOLc8erg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=avtWfeMglmtFD8xqIjpbS8FGYDBcMjNGkAW41+u+N9Y=; b=YEqFS63vXjB7AUcKVNe2KrdHClCIeU05tj7+i+w0cnJz9fvaO5wdxdoegIKUqOh02XOXIvpQWznxJwxK3vMf9lFDmSrbHfsUUzSzsDr0rAB8FztckgIhDMAhcI4iATfTKFFFWJ3IyrIBb6+rCNGDi7TNrNrZNFv4+XI+gWZGy9k= 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 BYAPR10MB2968.namprd10.prod.outlook.com (2603:10b6:a03:85::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.18; Sat, 29 Jan 2022 22:02:41 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::2d52:2a96:7e6c:460f]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::2d52:2a96:7e6c:460f%4]) with mapi id 15.20.4930.020; Sat, 29 Jan 2022 22:02:41 +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 Cc: Steen Hegelund , Lars Povlsen , Linus Walleij , Russell King , Heiner Kallweit , Jakub Kicinski , "David S. Miller" , Florian Fainelli , Vivien Didelot , Andrew Lunn , UNGLinuxDriver@microchip.com, Alexandre Belloni , Claudiu Manoil , Vladimir Oltean , Lee Jones , katie.morris@in-advantage.com Subject: [RFC v6 net-next 2/9] pinctrl: microchip-sgpio: allow sgpio driver to be used as a module Date: Sat, 29 Jan 2022 14:02:14 -0800 Message-Id: <20220129220221.2823127-3-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220129220221.2823127-1-colin.foster@in-advantage.com> References: <20220129220221.2823127-1-colin.foster@in-advantage.com> X-ClientProxiedBy: CO1PR15CA0113.namprd15.prod.outlook.com (2603:10b6:101:21::33) 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: 5c2ff40b-5511-42e4-047f-08d9e37311bd X-MS-TrafficTypeDiagnostic: BYAPR10MB2968:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:294; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: biH2OV0zx8jl+yfiZcT2+3R5Vxu4jEih2X+dCSPflr5ze8Q8zdlYliNQuI19JpihNN2P2Xpm5DRouuL+CtI9halLr5VZREqkgXfyi661LIlfRW9MKAQyY0vcXWRmzo4QD9uFAIjg8cNMFJygfzIA2VfwI6WOcQn9IVSYQA/yKSe7CoiBXjHDATslUQbdDBjohEGejEg5bl64Rror+zAI8MosikFrcRqhJNsWwqN5WHr3gmj28bZvkqgM4gXBrbS3dfM9B0Is2AY8l6qrnAUoEO2aOhYGkRwtjKFN78gjf1FDx3IngkCYPke7hosDQegcaLnHsuZbRMRjmesP9SPQTbvRFyygszNL3YhAGFQPHFutl33YJsVptoiHXrlXhLjzPwxPoZNzvmhiOyLez1OqUur/JjzFQVMPEQO6MKPCA/k38tLjqTPATZvlbpxTwOMs3CLnXjtF0e7vwmGml6Kt0bFoUvK4iCTfGOHL9oe71vsCdLTK8Ov19Ro8b9LZKBlljowQlJ9eFb5uU8Zafh+uCASrhmrekHnidOBwmjHMXqku8DMWFFh4t5/W3FIx0PolCG8l0EvRMYwKWTiSzl1VQXF3OdAcbSo7cDbQ1RVkzVqj1QQ08cSUha9y8/qbstb43H13xP+KwjARgrGf2vB/Hd0titXMXGmmRgn6gg3iB1oWvsyN9leFf8PJ85OSLV/x 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:(13230001)(136003)(376002)(346002)(42606007)(396003)(39830400003)(366004)(186003)(508600001)(5660300002)(6486002)(1076003)(86362001)(66946007)(8676002)(66476007)(26005)(4326008)(66556008)(8936002)(7416002)(107886003)(6506007)(38350700002)(6512007)(2906002)(44832011)(6666004)(2616005)(52116002)(38100700002)(83380400001)(316002)(36756003)(54906003)(20210929001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ycvr+AfwIzoiY9yBOyiBzwlUChKLcLN+n9AG1G50L5xf0IFrO/Rw4Cy6KqT+D/GUs1imXlnMcXkWLBU1nC/EOMfGgQGH6ezg8wecwG0+XXWS+4u0KPfOhqPcNNSIiAbSDdk4xDh43I6l/nuricVeQDW3nrCqbu9TV4oUVNP/j8M/wI/UBOdbL77woWt4775R2qifIOcWnbz/prb9iFflbUADJJ+aDMG8AjuskjLI8Bw4lKvXnyd2pzbgUyuKzZ/tdcnlK5apkwl01TB2otQ5ZphOdCccBbfrYh6QOQOYqHYVf9LayGtJ6qmzvM4GGVAEj+aVSRj2NOnovB/N9HNt/IP3Xm0uTX6Sx5Swwjd59BhO+2jLXAmUro2UP11Pb2JlQRoMnxkD9tPTCsPDUhruEW+Z2IyDfYnrbRwmQYLSRgySKqbdyeBAHugcmpdaG0su2gkzYPz1+td65wXy+EwILBge3jgKObf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e9x5zW5U2FnuLP139tHs4Zy9C3mb8egxEE6VPCOUjqDljUD4HmGWAoptYRIcc9AuEBxk+s9yymC+HnafRCGfx2mFo1ZUbwUEql1+l9zwni+ocyWIQ9TzMoky+LMx8+OECg== X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5c2ff40b-5511-42e4-047f-08d9e37311bd X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2022 22:02:40.9386 (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: h5kPQtnJkMfsBU0pjJnPWBWB+2KFCbDYqY1S4+S32LfVaenY8oKheEXKWhQEf4wzusiGWjAkZmJ26S4vAKnDeAOfLCsS4k57NXAOBXJFYw8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB2968 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220129_140246_090961_A95B4DC7 X-CRM114-Status: GOOD ( 13.95 ) 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 --- drivers/pinctrl/Kconfig | 2 +- drivers/pinctrl/pinctrl-microchip-sgpio.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index 1b367f423ceb..7ff00c560775 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 diff --git a/drivers/pinctrl/pinctrl-microchip-sgpio.c b/drivers/pinctrl/pinctrl-microchip-sgpio.c index 8e081c90bdb2..8db3caf15cf2 100644 --- a/drivers/pinctrl/pinctrl-microchip-sgpio.c +++ b/drivers/pinctrl/pinctrl-microchip-sgpio.c @@ -912,6 +912,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 = { @@ -922,3 +923,6 @@ static struct platform_driver microchip_sgpio_pinctrl_driver = { .probe = microchip_sgpio_probe, }; builtin_platform_driver(microchip_sgpio_pinctrl_driver); + +MODULE_DESCRIPTION("Microchip SGPIO Pinctrl Driver"); +MODULE_LICENSE("GPL v2");