Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp183763imn; Tue, 2 Aug 2022 23:04:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR4p8dV+eOYtvTBI9rjh1FdH6AMNyDrADxlmuKQQlj3vg7UUzvrm8L+SLqdR6QdxZKfUlY+l X-Received: by 2002:a17:906:98d4:b0:730:b545:fb5d with SMTP id zd20-20020a17090698d400b00730b545fb5dmr744496ejb.532.1659506684819; Tue, 02 Aug 2022 23:04:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1659506684; cv=pass; d=google.com; s=arc-20160816; b=zDCwRS/Tq3BQ6oIfDRuePPCnTiU/qLTXBu/SmtJ/z1gajLIhh0wzfY41jTu0SfAQZE 2sSXaalEk/li+y9tP2NR66BMCnu4R/2U7kOr23A56PLnpL3CPgYQVF7FVri2vOT7bZI6 oN/T3oF9zvBVImIHUc4a5Jrt3cJUbEksSYlRJfT0vtNz65eIM6Onjshm/deDG4OjhC/a Ig8G7dqyTSbAt4AvNs+KmycqGZpbat0ddNvzW/sUO94OPz7np/v/72+zNMso7bFYf/pI 1Cdr3HmOXf2dH3f/8KYk8585doDL00KBAQ5libKBuspW8Hj0Svwn/JIGGM73srQdRNQK b73w== 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=RB2Ko3JvokEA1QTdWmgqle7W+LlLneKUy/WEwyOhBeg=; b=uTUnFwHC+OzHyd+XD09B2S/DAIxa0ybUEYlFY5mhrrEzV6cujoOz0qGgBeuLdDv3LT 07RKfd7ZHctItaji4P6zjlotlWms5a/keQVCHvA0I0n/P8si/p6KMbVJ5X8Rvcb8pDB8 9Wz42l7B+tc1U1ACHi+NMmIxHfa3vlfAi0zz0e/MHqrtuJQU944pBphTt8nWZ3ta4Sqi X+f6NgKhF63BbD/ZZf/G7c7G4ioiT2yURvHNmWn+A8e/Ys2u/yjxXGvy6bsOZM4xmd4S 6o1WnLdWZf1wI/hf4yeyBx6/Or45mv0H6F4lHsD8LrXGG3KIBdQQH6Qx5MoBVHiF57Ai IXbQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b=jxMMisEY; 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 y10-20020a056402270a00b0043da37cd99bsi8262168edd.630.2022.08.02.23.04.19; Tue, 02 Aug 2022 23:04:44 -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=jxMMisEY; 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 S235590AbiHCFtM (ORCPT + 99 others); Wed, 3 Aug 2022 01:49:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236730AbiHCFsJ (ORCPT ); Wed, 3 Aug 2022 01:48:09 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2121.outbound.protection.outlook.com [40.107.244.121]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95B8257267; Tue, 2 Aug 2022 22:47:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NkVRBa1so/uU4lhXTuPnlKaXq65MQQovr4NSsmAiyFTrJzR2ClVlI2oWw//sMnfiN2zI5v3VwpirVEl19Iw+Fl1UVSc85CL9sFrrp4HjrDk7SdRLsZPDI88+1WYnh93us94XHa1jPLH6VI5RS8xiJRdir8YwG90ec82YZfjhdH3DiTXqYr/SmoiSG/CHhDWZBdcl6mluuk6vSc38nlpXvtTiuOAs50m5rnCVWJf2ZHtLK8lYstz5bXFQpdsxtPH1bJQYpJAnpdvwrtB8jbhFwSs4V9tU766oCG6Zh63RzXvi+5ewjG+adRTu7DQSlcc43Fk0XXlQvc4JfHEwqTe8aA== 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=RB2Ko3JvokEA1QTdWmgqle7W+LlLneKUy/WEwyOhBeg=; b=ehS2sTUG9WcqBhSJpKWV+oMyjF0r/UWVYMFhULTx+aVy3Fw7rnqQQaTGPudv5vdcw1ZKu1uXOLqq00Q5GJ10oPvQ6qmynTqfqtUY3hlg8vNvOp3h/C60ms1WJKlMV/JJ3M4ILRaOR5Ii9Vt8jVsWo7ZGMAYeqS2qHbttNK2MIJxlR7UInvRBu3p2lgvPmuBWoDVWDe7hq+utAmojL7y6DS2ivENhnI+ytO6ssGmCfwqaMkCp+NFEB7OZrnkaM8RPOu/b7FJ6my4tZiTR1h0fG4Q9WahCuohOHEFj+AASgt32WXYyoDhZ4w45BitjJTCN3yoQOLqCKhLgoS50AS4/Dg== 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=RB2Ko3JvokEA1QTdWmgqle7W+LlLneKUy/WEwyOhBeg=; b=jxMMisEYLm/jSzLAMj5Fd5zKl0MKS/eicwseyaExS5+u36/fE4XAz912r3zPCKrK0l4CvHQWsmzX2zkK8Qh/hNm/LYDyBFSBYyOAxQ9aH2L7swFV9AZal/mDYoc2wPD5ioVJliwyoyTbpqu6kNdZIfo1KOXtHhiZ2bauDzp+nHY= 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:52 +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:52 +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 Subject: [PATCH v15 mfd 6/9] pinctrl: microchip-sgpio: add ability to be used in a non-mmio configuration Date: Tue, 2 Aug 2022 22:47:25 -0700 Message-Id: <20220803054728.1541104-7-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> Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: 580a5303-405f-46b5-d954-08da7513b4c7 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: XzlRd7kVOxqw9uL+9jQWrwxAryqoeO7RlFhzEUMprSo4iGgaC8fv1tSCW9byUOAYEbP/KtRMSW72aqqxcKX4JzjeGurqwba3/zY5RUcq0CjTz9O2Bcd8XavMY7PC9jWGWJ7fh4FfSZbLwlbMagTsTCfsOoF7JBXQ5Uh2R0b86Sm+xDJs+BklW4+/lBNQFD8+Xe0Gx2p6XSUn7mMp1591PWPkzQNP3WW0wqq0n7SCRkncxQxypKRgjU6PyhIbzqYoihv4R8+wbaI4kBA48ecg8SRlkNGYnqiwdLeMSHfEdERBoweq8UyJIpEkNVhfDyRKtDNPw3IEu8VXaxKTSB+qyQLqSixBwbW7ojkedpneqouyU+rMPRYxbGGVqu76zOWrZGkItC+zJhWpyKsfhc4QeAMulGGHn+mdbIS6BLrHptjk8oTFM8EPRPNW17G1/N8EW0MXaUpiJ4awQ0JhjhehAGG+ZVwrbtX/t5YpFKf5j9YPcCWcoY/8E+JCaoIrZZjCL9giOmrmB4rkr5+xLCZuVI2W4pVu8Kk/rwMcpC1sQ+yj1okYkl+3GPEqheV2Y5hbrluu0MGcNJ9iTDY3mCj9RzpgBQqotzJ+Cad6bk1NzoRta5ZL/D2lr6fi+TgICMn8/KBgJKTE7TPie317TCpOhq7ADMDHj8/M8AfjIDN1lVhX0T7vJFXL5SdJ9p6+0wnpTNv/WPrdKjlOsfx8Gm8ArTiFd9rL/0keac6G/3Kqja9iKDxzB3X4ZOm41p+lk0swixtZOF0Bl5HhkB+IpJH8ntpQLQQPpwY5m5DJusTnrZs= 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)(107886003)(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: =?us-ascii?Q?Mcd1RkYp0D5DBhTt4qDzmJc4tUJ9pf1asYjdUJ2TJnotrUzNA06gw78ghN/t?= =?us-ascii?Q?jvaCyfrrOBYhcRc1x91D6SYxXzj/4xw+OxE5jHlsU4j4zU0KGoPdh6BZdnzq?= =?us-ascii?Q?IZE5dMh+5vM0K76ctOW8pVs4jieL5p6oqiPMTaJCDCx5xOm/Wbn0p7BO47nf?= =?us-ascii?Q?BPcgJ3NL67GedOre0jpMkl/RZ3jCx//PWogLhBJ3jdONbPiC+gTO7jbzF4xe?= =?us-ascii?Q?Vq95posJElb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-ascii?Q?ekHb9DeZfXZbtkFnyEFZuz04kbknLFNS52ZpFFuPDURPgjnjCxTOxvxHL+xG?= =?us-ascii?Q?91tRM4YNxIYQ/Q7eKlEiN8+TsWm1ppy/lo0r9oyX3TyPHntQSmU/2Snp3e31?= =?us-ascii?Q?CWb5xRlq5Jcp34+cFAEu18a0ibw8oFJFfxQlz4qhHdMcV6GhbjO/vW2Oluwi?= =?us-ascii?Q?NtSj6QlKv3HQRVqc1nt86neHU0KJOEQYwFQ+zhglSpQkeeMjYqAWmqmI96LA?= =?us-ascii?Q?1rGlZr+RecGVZluJM/zL0x4y+YDMYA+QbpMdt5FVZHivpJyOhPERdPl/rftd?= =?us-ascii?Q?CZZOgTQvCyCDTZJsnAGG50dyZ5dmzNCD7hajiV/L/rhuFNg5S6a/kg9/vODr?= =?us-ascii?Q?lR7EcNH9k8rpx1zmjmeHJ8E5/06Ho7Bp8lwoXC808AfjacM7ixNzulvc9Bpb?= =?us-ascii?Q?QPYThcZu1FnyzAoI9ghuIHXlytUAhzYwe275Pk8+lQwiFXOzVA46LreIXv2z?= =?us-ascii?Q?NQ=3D=3D?= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 580a5303-405f-46b5-d954-08da7513b4c7 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:52.6202 (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: Jwy2PVJA+ADCUnnQv004FCojy4jD2uRM25yEcfpp+5gS81ifQtGusg/PLxRYwpBlRIZd4tmKPWwrEb7hy2wH7F1OK65sliqiFPnJHCGdN7k= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB6438 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 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 --- (No changes since v14) 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