Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1998485rwb; Sun, 14 Aug 2022 18:29:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR4oTrRaHftmluKs/2dgBQnYkmEot0N0lgMxZyBn4CYzR+J6YwiXPuEsmO9SfG7/30bFmxgN X-Received: by 2002:a17:903:1247:b0:171:39f2:1b25 with SMTP id u7-20020a170903124700b0017139f21b25mr14638384plh.52.1660526989673; Sun, 14 Aug 2022 18:29:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1660526989; cv=pass; d=google.com; s=arc-20160816; b=jyMw/z7ojaId1obhiWbyMCMP7HbMUBw0FFXdPcZQHR+2QlAnaVcazkBOim9PTBEeP3 YMi85sECdPAsQYpBiOFhw71JSMM/43PNQlORbDV0Ada5tqmQYBytyvgRr3lcloxpu932 bIZPZN5R/Mwu5mSomgrNCkTW9igg+QP3zfcOhDQKWJq1nU2kpvSE15PeeMDZo0VOst+H MALsQRSpx75S8Pt8uqwxIdBMejr4YTlsSCiXM+YO7zadiBZjAUp84WfQkd9pWMmMlVDv whJ9LYXqTUz60HIQqWCLfYCbz/rKW0z240ekh1t3vvOPtf1HeyvsT3mpvyQSZpuDqhoL RtwA== 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=VeRckxEZO54EkM75hMOVmLtgg5AW5O+vUBQluRmm+bU=; b=uiDEU24USfoPd/mcOOQmi4FBynd2jW2VbXdf9i3UflFA7s9rMiLn1Ic9QcdGzfJiV6 E+CmNfv75EFAsltEdL8AoTv+7amibJi3pozVadpSyQG4lWOGLJYZEeCxkc3+WMwiAtDq P5FT41gC5SaZdgrFv8C2GSRxXDg4LpE08fc82StZToFRpILQGAqx8O+Qavnkb4uNibNa ZZuj3lre6DUqGQL4LMKRpR5KAAsdOSeV22/PBEqOY6FRYTNzTM7Hrmdsx4dUGxV6efRR lTkkDHsxHS937G46DVYpPL2PpGiucRuFQmXTIwagYZ4ggH4Zsn5afFQMGU3vVql8f1OA XS/A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=aqpyGBmW; 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 x14-20020a056a00188e00b0052b07a5c0f8si9881364pfh.137.2022.08.14.18.29.37; Sun, 14 Aug 2022 18:29:49 -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=aqpyGBmW; 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 S232376AbiHOA5F (ORCPT + 99 others); Sun, 14 Aug 2022 20:57:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231642AbiHOA4m (ORCPT ); Sun, 14 Aug 2022 20:56:42 -0400 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2126.outbound.protection.outlook.com [40.107.100.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C07BADEC3; Sun, 14 Aug 2022 17:56:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U1bAF4ZrVbFH8gSK2r4A+ZV7jkypW/J84BqLCyvwYEn8RI+flFA5jSak1mDofPsgVtTVOPuMD6w70J/NgreQYTlgQjVfRYqnn8z5gFDtj2XuU71eVnd3TCUW+y0Jwgs1vY/KhxMcvQU6I1gAJvROXHjPjO8IulgCfr/d/qHNgV19tLrSOl3MNtppYGa64+JYT7yYH5gev92A10wQkvC7XclRzfAPvcq+IsLML4Tnu6uT+70C0ssVgmxxSnIj7jMyXpqYDGdl4sz1Yq1bqGs8Hlx8P0tpWm2+gPGdIXowl3BiwmDyhUbExfPfRx8gsiYhkdSNFPuaU6n5ILZWYYr6nQ== 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=VeRckxEZO54EkM75hMOVmLtgg5AW5O+vUBQluRmm+bU=; b=QZpmvG7Gu5P7AfIGItaaLE0zXMNquvIO7DqNAZ0WP9o4pVRuilKpdhlrr9Uo7g7dy6Erw64ritCPrmDNMlUvX7yIKxCqGiyKEYFm0JIr/C1wj3s2aJd6bEszbystu6fsFtT3sELzwsSWyC20pWI/aoxFf4VfF8Mjh1W8M/IwPyQoMJVGKT61uIjfImbjTEAC/jhLCcaj8Q6+wIfZ/NWwt0w6EdjEcwo9ksPfydkw4cN7/XnRW9UV/fN9mePmW0jvZ1TQ3i+8jebe8XK7DiE3ZSI1e3jyYOz/Gy6qOdVoKPti2CTYhbvFw7S7o4K18B8kobM6w/p3HkI7j8QhX5bKww== 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=VeRckxEZO54EkM75hMOVmLtgg5AW5O+vUBQluRmm+bU=; b=aqpyGBmWPt8QXJxXZ4OMK40tFnF+GDC9DtcDzkl5PIMIocoM/a+dldB3yQ7ylauzotIfGH8WvMfA5ZeZVsGMDEtC14ZVsZyHocpCZw+SR79TWEtL1K+Af7/RDcHo7D84DH3gOnK099FkzzReqWC1OiEqZkGwL3tx0p6mWKYeg3A= 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 CH2PR10MB3862.namprd10.prod.outlook.com (2603:10b6:610:8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.11; Mon, 15 Aug 2022 00:56:13 +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.5504.027; Mon, 15 Aug 2022 00:56:13 +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, Jonathan Cameron , Dan Williams Subject: [PATCH v16 mfd 5/8] pinctrl: microchip-sgpio: add ability to be used in a non-mmio configuration Date: Sun, 14 Aug 2022 17:55:50 -0700 Message-Id: <20220815005553.1450359-6-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220815005553.1450359-1-colin.foster@in-advantage.com> References: <20220815005553.1450359-1-colin.foster@in-advantage.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR08CA0034.namprd08.prod.outlook.com (2603:10b6:a03:100::47) 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: 3a4f1b3a-1b0d-4d7c-71c7-08da7e58f36d X-MS-TrafficTypeDiagnostic: CH2PR10MB3862:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S74AKBcejZBvK1InBKTCo3H1rB8tSoZne17ZbxabYV2mZoD1iO1Kzqn0OKUioOH5ruq4j6hgtrdL6XS+9uNVzGRRxmWE5bFAsrDlSp4lO1dFgKz1iWmkkCBS7nt3Vfe0t54jE9h26rg18MwhlhfDD1M3SwDG5n/ykpt5ECACb27P68Teip8hE04LAZBhjfJzahegYuM091yxuFaTw20OyxnjkOdLE6m5chg4WGpG2jiHsziUvgAqOEc8pHoaSe/xRAEN6o+vD1x6Zi8rtt2b3+EPl3Cb6o8Lm6gqqK0yydyIrlnROuYnfCX13vGCoUS4W8rPFKqpUhAp8lWbBGLDRT+2fJEsbYxjyU58T0FCJ4rYY6HCSC9M/w5fjotyByLMoLMkQbNo8QobD0SmSSiJ5eTwbGS866UxfW5IDk9CN7StigfL5RnhRet4qYobArSrDEod7ZXJiw73tB5sVmDwBI5Bd3FbzdoDyiVX/UUQjrDDd/qEiSi6oiPLuf/JdMOn9IVdN+cyhwJ1zPi6tHxcZ57f2p2fxiE5yJVGXs1GZOe2cXY/NhiBeN/fFH0H0E4fAm1E6OMpBOegZNzYDrpqmkNVUuOcUzO/TR+qYxUkB35aXDZmOxDk0CeTiMhH+XCWgzcqMG/g5vQOCBp2VLuom2C94D9Gg60nQAWpqnzlmlbYJ2pxBKWULL1Ck2NxROiRiuxbIbiMffP8PBmAYz/3A6XY3xtZT3X9koL/cK5JaV7BzBIb+pLsiuY1edhaIbaEfAFu3Az3Guo+MC86R4tKTcpehg7BZdRmWmnNnu+Yijc= 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)(39830400003)(396003)(136003)(346002)(376002)(1076003)(54906003)(41300700001)(52116002)(2616005)(6666004)(86362001)(186003)(6506007)(26005)(36756003)(6512007)(316002)(83380400001)(4326008)(66946007)(66556008)(66476007)(2906002)(478600001)(6486002)(5660300002)(44832011)(8676002)(7416002)(8936002)(38100700002)(38350700002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?DYQ7MBHF/+j8HqvCUfy+W+5sX0tHy5IwolNY8p6YwVL0y+aq6VkES0BDAZ3U?= =?us-ascii?Q?UaILYMIV9K8LJsoLQPGzUzLkPlFW9OJ4R1qxAF7wM5wwfBWMVJ/cgnwQ2IRq?= =?us-ascii?Q?8k/G/0KL5gXfllq2hmV+7P3uOYj67www8eoe2nnA4EqCj7y+4SA7GA3OMCF6?= =?us-ascii?Q?oqCckLpMGsLGgDnahv45stUshaXrMnD9bRVgKetmojd8GBM3GNO5b/1In2SA?= =?us-ascii?Q?CiO85LC5SjVL/ROPiB5o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ascii?Q?m5h9FGcxHne2JU5kmPEnjEYkaU9XP8vVy3c2j1UEavHc+xdOFxbg084ez96z?= =?us-ascii?Q?jC2z81+7oPIOSo3iKL4W/mot1NJ6wahBqbU6SF5luv2Cidz3HI1/6gwwdrXc?= =?us-ascii?Q?SRU2RDj9F7dF4cfZCHVZvJSpUoWag3jWbugf9CHEKuIhqmbktsVwdgei1yVm?= =?us-ascii?Q?460EY67ZthVjOangx6dKSHJhlEN/noPthn7b/foU9jzpuHKhOy/ebb3GGOs0?= =?us-ascii?Q?sxfwd77QEGthyCwmYV6x82F8awxwxLUWLG1Bh+RZhL+nxXK4VoxbZHFByPd/?= =?us-ascii?Q?3ShCKMl5G2EhgaL6u/tL2uCgGUXyfK+aX7pgAA6YUKjOgWOCf6oTZ1wXgfPr?= =?us-ascii?Q?0azJK1PCfaw0z4YCJVv/TTb7WNH6ngqLa4um5tC4oXgLIw+YWuaO6ENYOd6x?= =?us-ascii?Q?QIfGzZuHMJLcMQpYQhsIDeWqRJ367Y8ftxGFEgm876OdySThnKJH/OTvGDOR?= =?us-ascii?Q?RA=3D=3D?= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a4f1b3a-1b0d-4d7c-71c7-08da7e58f36d X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2022 00:56:13.4947 (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: ikigP4setFmEi9fqscGQNGUc5LXk8+XRPX5NibrDMtWOUaFw8InAymNZx/uE10BFDcytlixDw6eZo05NFE29/16cjnOmwjqli/cn/AYUVLo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR10MB3862 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, T_SCC_BODY_TEXT_LINE 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 There are a few Ocelot chips that can contain SGPIO logic, but can be controlled externally. Specifically the VSC7511, 7512, 7513, and 7514. In the externally controlled configurations these registers are not memory-mapped. Add support for these non-memory-mapped configurations. Signed-off-by: Colin Foster Reviewed-by: Vladimir Oltean Acked-by: Linus Walleij Reviewed-by: Andy Shevchenko --- v16 * Add Andy Reviewed-by tag v15 * No changes v14 * Add Reviewed and Acked tags --- drivers/pinctrl/pinctrl-microchip-sgpio.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/pinctrl-microchip-sgpio.c b/drivers/pinctrl/pinctrl-microchip-sgpio.c index e56074b7e659..2b4167a09b3b 100644 --- a/drivers/pinctrl/pinctrl-microchip-sgpio.c +++ b/drivers/pinctrl/pinctrl-microchip-sgpio.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -904,7 +905,6 @@ static int microchip_sgpio_probe(struct platform_device *pdev) struct reset_control *reset; struct sgpio_priv *priv; struct clk *clk; - u32 __iomem *regs; u32 val; struct regmap_config regmap_config = { .reg_bits = 32, @@ -937,11 +937,7 @@ static int microchip_sgpio_probe(struct platform_device *pdev) return -EINVAL; } - regs = devm_platform_ioremap_resource(pdev, 0); - if (IS_ERR(regs)) - return PTR_ERR(regs); - - priv->regs = devm_regmap_init_mmio(dev, regs, ®map_config); + priv->regs = ocelot_regmap_from_resource(pdev, 0, ®map_config); if (IS_ERR(priv->regs)) return PTR_ERR(priv->regs); -- 2.25.1