Message ID | 20220628081709.829811-7-colin.foster@in-advantage.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 9174EC43334 for <linux-arm-kernel@archiver.kernel.org>; Tue, 28 Jun 2022 08:22:03 +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=sl1RdevBMtaQADnvRIfMOXeRyzWkCP8EfzHSEcqFHgk=; b=t/xyOPjEqg8JUd oyh8gdB9hpR9lABmv0tY4GO7eSybLlA7ZBkJsKeqxZ4PEIZ4jKwfnXTdyPYPCtsIUn2BJ1kWvMO+E HJza5m0B3KMgMN6mQ/1thucvVTu3LU4oQhoLpgsOF+yxGGxVGArt6oOZul/N1fy7tK72+94ef+3iA 6iZHQcD5qauXz3Yzu6Wn/hI8C5vKNtJMk3O4TULNaP1AXxNk6Hu1Qdc7LIRmroVAZCDmq6f6t5zdS xYRsxnlncG5RN6+ueEVZl8PMpreG/z2rulPIYEzx9/wPEyfCLZbr3Zj2tBD8+2Kh4RPcPv7/p7n2c ySBg8whPJrxgg+GIXOhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o66Sg-005DAk-CO; Tue, 28 Jun 2022 08:20:43 +0000 Received: from mail-sn1anam02on2123.outbound.protection.outlook.com ([40.107.96.123] helo=NAM02-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o66Pm-005BdJ-Ie for linux-arm-kernel@lists.infradead.org; Tue, 28 Jun 2022 08:17:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I+9r7svwppcMyaZDcOLPj/af/sORu80bJSiHWGmtPQIoqR6zChJXbuJYFOHEz7ve617KTw/oEd6zyivrHA2VKk2eKS6rrzGRhKaBm2QvPPrQ3m6ChbqhTwdOPXRKOn3K88C9XLcSmRO9eM0oqEH7A45GlfedwvMsCUBm80i3yWmIODblzyP/J1V2bJP6KXazFSNcln17Xx3OS3C0KgJQ41o2S3uJ1mbgYdmjkV0plhSnGjG7n/Pby5JUZhCIqRKWMOZ09B5SCeJAT9UPH+yxxKZ4sjIPbYBKtxVm/vrtcGHoHmYCylel48TxUfjBARKjGha1UeqlokOJSnhVfohNMg== 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=Hz8l3dmutRiH5cPvPX48O7gaWF1rOkq/6lmdFFpPong=; b=LvLchjVQrAy1nBP9iilQdgB7MKeLQnIBee+iOfYxYDmkguYycqtAPzTqIxCmN3BgwyQYidVvW17mQN1fi8afTK+pYVVPemce89VCQUNe794d3eJbOjMirvVlNHM1Nmc8y35A3xLtcpijK/iiCsMjpth3Mvbpwm0rj/2/SBEVs/MnraB7QbChrHWUJY2O9VqchPnsH2bh9aveXsV7DtPJLZMiO6YR3wgh/pD7EXg4uO1DMDho69YhEj16od6kD79tiekD/mMdXPyFfLcM86DG00V5tqlxAykpkOVJCKf0oN80HHr+zNPh7NtNzcS+ZZqbEsLuin8QySQsD3cgAnznUg== 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=Hz8l3dmutRiH5cPvPX48O7gaWF1rOkq/6lmdFFpPong=; b=aL9Aho+UPk/hczC6ucNDryasFUm5G0AN3GiFy0yB92/5Z8K/jz39mNb4trY19MN57CX3EwswlbgbFlmqLOBurj+TPAE1oLDZqHpOIs9Ksi7M7igwlSh94W6dRKqTND52J8f0INlgRGabFPtpRGk+CaieiLCohKBL9R3RlFQX7cc= 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 SJ0PR10MB5891.namprd10.prod.outlook.com (2603:10b6:a03:425::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.17; Tue, 28 Jun 2022 08:17:29 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::712f:6916:3431:e74e]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::712f:6916:3431:e74e%6]) with mapi id 15.20.5373.018; Tue, 28 Jun 2022 08:17:29 +0000 From: Colin Foster <colin.foster@in-advantage.com> To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org Cc: Vladimir Oltean <vladimir.oltean@nxp.com>, Lee Jones <lee.jones@linaro.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Lars Povlsen <lars.povlsen@microchip.com>, Steen Hegelund <Steen.Hegelund@microchip.com>, UNGLinuxDriver@microchip.com, Linus Walleij <linus.walleij@linaro.org>, Wolfram Sang <wsa@kernel.org>, Terry Bowman <terry.bowman@amd.com>, Andy Shevchenko <andy.shevchenko@gmail.com> Subject: [PATCH v11 net-next 6/9] pinctrl: microchip-sgpio: add ability to be used in a non-mmio configuration Date: Tue, 28 Jun 2022 01:17:06 -0700 Message-Id: <20220628081709.829811-7-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220628081709.829811-1-colin.foster@in-advantage.com> References: <20220628081709.829811-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MW4PR04CA0259.namprd04.prod.outlook.com (2603:10b6:303:88::24) 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: c8217e62-8a55-4d6d-0726-08da58dea465 X-MS-TrafficTypeDiagnostic: SJ0PR10MB5891:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6hOjN06Q8eGcSBps/Uk6Uky6CWZ0r5idDFiogJ7wKuucgC8ive2m3eiuiBJ80DZ3YJzU/U9Zpbq2PyH7ldB3rNPPGy9tqesc0Byk7yK3Xow5fcxhMRURw5bnAtffJyu30JBXiiuwqX92D5Do7KTeXGezM97jTODcCAqrvzIW4UrvNARu1d1mMuwOV9riHuSv2UcX5XmzmykoAoyHs6zQV4tm0A1+rvS7ZnLC9BAgRfrtsSj8/yp2ENQU3+9eTR5YNbMh7KWwO+yfwXWfV9wsqeWauuF+ulh9Xe0z352nLYN6ipTEViJGjnIrqfjEoAwLh+afiROTSwHdsht1NalBXZVS6rXYd6i49Qah8RPSbh4X/A3FqIQCnjhZXuwFA22+gLjt4cZSeOnmKYgrZDUbxXIz/GU7W/PAW/c0OByUGz1oJpb/tOX1GMGHXH/yaaazCW8hxpgnAjiHeibQax5L5vdpnJU1Pmd1cP63+4sIQhCvDHv+ktKeFFoaL6ACqgXGa4KRcz3STHap3YExLNdmY7qwpM7WKEC7MHFq3zcsakOmu08XHZfOarDLqVlSx2WPq6HxJO0hCJ5N0L3R5zz06YBymWjxmLmuaVQlARxE+dCqtJvY2+ZpyfJv9WYmoRoCN6XvOYfB+FtKEMUndbfQ0Jjv8xJz4RMPq60CT0go9a/D4QH1BGWxqZ0jcyYOpeIpTjP79XIl0MmqpZZjZ067Rst3IzTo+IJjQquRD0ULw6kH3zSQQZ0I8Q8b3G9CpYQ7DgA08ndNEkL3qX9tvCihG4YL0kLJ10DS0BAlttojT3I= 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)(346002)(366004)(396003)(39840400004)(376002)(136003)(36756003)(38100700002)(6512007)(6666004)(41300700001)(38350700002)(44832011)(478600001)(8676002)(4326008)(2616005)(66946007)(66556008)(66476007)(6506007)(2906002)(54906003)(86362001)(1076003)(6486002)(8936002)(186003)(5660300002)(7416002)(316002)(83380400001)(26005)(52116002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YWPC9TAijY7IJjxCgunvFV/qko5w38UfdPk+Pz+yWdXYMWLybxJcrmza1iHThOtYQn9nSvaBxG5MFu6CXowaJ5LhVA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eO6xNpHrqKsldaiu4U+mrSkgpDn75xXeqmscHzagukREXXcq+wGFfdQ98f3ivJ1we7IwG4hXiaCllhQUOVt0dN3AHox/on8bTIwIb+9L3e4uDn68CBFuBtQ2d25C2mLR26hTZgYF4sxFGN/2Gax7M94HSWz9Hllqkt+M4eBRgFKEOppSz6hvRNGTZ6ZoAZu+Vt8RhlDT2iLNfh1VZKZU+A+v1mNRvWOnwRsReBMeSdGpyf7Y7CLJSdIiWdogkEjkgoIiP3iW50SJSQFPotc5OhXov3nwBFZuT49M3DEIQdD+wTCT7TP4Z6c+ruHr28+TjKZGZg5jzo9UT963oyoWchNUN7pUXITurzJZKcIRolbKT1UQfC6a4kHvV45u3RX5tL2PitiqlS6NHXXj0PpJKBd1cIw3poXar4DWzhVAdNFfWerrR0h01zJM0J/7Q== X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: c8217e62-8a55-4d6d-0726-08da58dea465 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2022 08:17:29.2289 (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: 4DWB10UyAEavLbVlBZh3A7MUHID1TybGlfalNkuNYrZFgDN9pnI6AjN5ZIXawQl4M1s7E94Sm+Mg0y5xlC0CVA/1K5rzAiuhi0krWieL/vM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5891 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220628_011742_656566_53624777 X-CRM114-Status: GOOD ( 14.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
add support for VSC7512 control over SPI
|
expand
|
diff --git a/drivers/pinctrl/pinctrl-microchip-sgpio.c b/drivers/pinctrl/pinctrl-microchip-sgpio.c index 47b479c1fb7c..c924605f9d03 100644 --- a/drivers/pinctrl/pinctrl-microchip-sgpio.c +++ b/drivers/pinctrl/pinctrl-microchip-sgpio.c @@ -12,6 +12,7 @@ #include <linux/clk.h> #include <linux/gpio/driver.h> #include <linux/io.h> +#include <linux/mfd/ocelot.h> #include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/pinctrl/pinmux.h> @@ -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,8 @@ 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_platform_init_regmap_from_resource(pdev, 0, + ®map_config); if (IS_ERR(priv->regs)) return PTR_ERR(priv->regs); @@ -1013,3 +1010,4 @@ builtin_platform_driver(microchip_sgpio_pinctrl_driver); MODULE_DESCRIPTION("Microchip SGPIO Pinctrl Driver"); MODULE_LICENSE("GPL"); +MODULE_IMPORT_NS(MFD_OCELOT);
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 <colin.foster@in-advantage.com> --- drivers/pinctrl/pinctrl-microchip-sgpio.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)