From patchwork Sat Oct 8 18:51:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Foster X-Patchwork-Id: 13001852 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3D02C433F5 for ; Sat, 8 Oct 2022 18:53:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229844AbiJHSxV (ORCPT ); Sat, 8 Oct 2022 14:53:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229841AbiJHSwW (ORCPT ); Sat, 8 Oct 2022 14:52:22 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2118.outbound.protection.outlook.com [40.107.94.118]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9AAC3F32C; Sat, 8 Oct 2022 11:52:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZqDuPi+1dATZGwOi+9qGG+1FoS7q/fSEap0NXOKWgqJh37r7b+VKnRIuer2vygKUhPbgIlQT4Mds9YAGRDDtoVnAzee5LzrTJomYyiy5YgzMZgZ0i4x01STgqOMLCHi1GxAQKABz5I3zA63qnWy5xiwpZKXljBFtisrPuwfQ58hu0UgbDo/lNZGy2Bug8f1Ey7OnLqEsnXiX9PpgCPGRhWebuvmZmVJQ5Lm8YJ04kkeaYiZ3OGZOgx+jvXAdDIWPXuuzn+b58/ihY8toRbBx3Ha4oei8vgB9iL8qrLZe2yjFLzd0tcPGvL4c8HqRyy8Oh/tqJYAQwM7ls/PLfD2cBg== 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=9zyYV5u/Nm8BrvODZoTnkVIm6v96W6ineNJjBrd6Els=; b=A/Ka8PTcHMdsJGdC6ccG+htaahU0QHLMfJQCngXvRVTScyBcFN4fhQxslKCxTOV+AH5ShbSAoQYs5PMpvg8X46DBhuOlnCq5L1yUI/l3I9YcVRb+nKsJvB2XYa+nBFnFGCa2KSq7HTSCgFeHKAZenuruU69NmEtK9wAZXoDOUZ1XWbWj9DZ8H3XPv17cApNVFqYTNvZ9zB0MgGC53IRJ40jpG9hlBRVZhLXirUUPmKKgvTyUZZ+N4jalLPZ4fhXM8kRORpmA/C1nshoOszXI1WrUdN/Ml2XIxBoSc4YcI5LFu1i+/WLjN97McxyPC3mHJwJszrLxeja8Jlj1/Iysiw== 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=9zyYV5u/Nm8BrvODZoTnkVIm6v96W6ineNJjBrd6Els=; b=gB/AZ/9/qLIkGGWWiNGiiERUYtkRBMVgL9CYmxNQ4qsWppNTtBnj6k75Rl3meKm1Jc/l1CmZFKpPZkjEFfPCJ+0wCo3Jf60m/uyPOWS5xl9fVT4COotwMxiooZKsFb4Y6MoitbJYRgrO4ziQajvgYEphUGO6EiXsazjvA3yEguE= 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 PH7PR10MB6129.namprd10.prod.outlook.com (2603:10b6:510:1f7::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.20; Sat, 8 Oct 2022 18:52:10 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::ee5e:cbf9:e304:942f]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::ee5e:cbf9:e304:942f%7]) with mapi id 15.20.5676.028; Sat, 8 Oct 2022 18:52:10 +0000 From: Colin Foster To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Russell King , UNGLinuxDriver@microchip.com, Alexandre Belloni , Claudiu Manoil , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Vladimir Oltean , Florian Fainelli , Vivien Didelot , Andrew Lunn , Krzysztof Kozlowski , Rob Herring , Lee Jones Subject: [RFC v4 net-next 12/17] mfd: ocelot: add shared resource names for switch functionality Date: Sat, 8 Oct 2022 11:51:47 -0700 Message-Id: <20221008185152.2411007-13-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221008185152.2411007-1-colin.foster@in-advantage.com> References: <20221008185152.2411007-1-colin.foster@in-advantage.com> X-ClientProxiedBy: MW4PR03CA0304.namprd03.prod.outlook.com (2603:10b6:303:dd::9) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2351:EE_|PH7PR10MB6129:EE_ X-MS-Office365-Filtering-Correlation-Id: 97d1a924-8894-4c01-1e7a-08daa95e3484 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vXUIknj4h4piNdlMFhYq781ZAkEE5qPeIYsFLRALRmJEXwbAegkCRuQTKJjZ8TEJ2vS02LQqLcxfZaonXX6QnTt3K5cvHbiMz3IHi1DaklrLCTCuBRIi2xenfD39JmCIWpUne9/n0/eEyqiw8S7g5NFlJlt1UhmBGXeMvoetLBTuu3MdJDSsP92+vYHkOupJCHShmoVBtk8ticNjGe/JGe0xFtDB+W7Hf3QV1fSdtGgDHdWGmMzXUkBfT6b99/auoFxN/tcH8U30OqahUw2fGFeqJEyAFZTnPN4sN3qDYnPClfsOXgYsvtE0d8/0jGT99iTWp4bFVzOt35/HRbNF038Rx7SDQf8HORydHH71NjF/YmMkGWdMj5KYfjy2zXMU6ToeXA2ogrGhto59yXSVfc/vh0G33yT8quq4dA8eZl1XIqBgZuME37LAg1+qK7dVhz10wDyJmz5CkVT/6c/QIs4ELnw2+ToZxbhakG+av/QxavIQRmuR/Dw81QMuo0kOkTwIUIBmDYFiUBZlbcZvsugyKRIfmqsu6IFjon5wHjiaAf6tr59WC2UXwkzQKrXB2h1IQ6dpbIcL9wUQiLYUgAQmXtFO6FTA4PnOl6SqF2kP7uJfhWC4iZHrdzO2kf+Jj2tH+j1p6NCDirySHXqN6hYW5im1WZFwZA8JAa2b4dmMmLrOQpY6CPMBHvvTOp9yGAcT1EgvB+G5/Hu7k2PN1iXk8bd6Iayiq7E5JsR4Py0TlgYUqxP6GF//4FupZtYTCyCGunzL9X1qaReNrl94vQ== 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:(13230022)(346002)(39830400003)(376002)(366004)(136003)(396003)(451199015)(44832011)(186003)(6512007)(6666004)(26005)(6486002)(6506007)(2616005)(316002)(54906003)(38100700002)(38350700002)(52116002)(4326008)(86362001)(1076003)(478600001)(36756003)(7416002)(2906002)(41300700001)(8676002)(66476007)(8936002)(5660300002)(66946007)(66556008);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam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2WORcWGOWUYWIvglphOIE8FgoHRxKRH0SXZOUDL60/YjN/a4hiF/yFau3mMjKgjgBEmWK9p0YKIrztF+WgEQYmTizAf1AiBVnwxAKRKs23WAb7N+wLQ+7vuPS3yYgj8Fh9vSxd32vvhKfCSQ1HkdDQLVsWnkaNSkGToXDKQDk3hNTP68aZoQDHX2w1UfRTnn6U5VvNVY4ZCor1xDSyAZxrOMP5UH0xT3kCZ0VEWbB9C+Q+l3Zmr4cofI7dEIzgH4byiNixYDbIMr4E0cJlqdBFuHbyhyUu85oGXYwT5g+qlj0aBGOO91ycDMZOKf4uvO42lWUltdQoW1s1rTUe9RId9wH0VLZkxGSWrZv8cQlSYNHQhhdsAxOx+Q4z4iX8e+OuDjzFnwjBYaHh/kdN67+oXOVeYHnZajdZiUBauYDKCzQPMKWfR2WiQHSPZtjt3i0ABut4eT2Mg3LYn9tRzALU2IP6PgLXkaDat9CExrgbJYf8Nnc2rAToqhHKqyEii+hRCbQJA3jSFa90EwHcl5G5fJoyJ2H7qatyah+lNAZRdB3VUqmr+9b3DOAV2fyJLEoxFEFyMOvNa1Fcms0kxLrXHJsBN+o= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: 97d1a924-8894-4c01-1e7a-08daa95e3484 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Oct 2022 18:52:10.1158 (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: 7+eBhdviUp3xvLSIzj6n0ttDeDIOBFwERoFTYFWJyPO1gllfvh4smSibmFFmgvRs9iQAqirq6XrwM+txEm07q7/ZJLMtiS2J5fNZCsyIZYY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6129 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC The switch portion of the Ocelot chip relies on several resources. Define the resource names here, so they can be referenced by both the switch driver and the MFD. Signed-off-by: Colin Foster --- v4 * New patch. Previous versions had entire structures shared, this only requires that the names be shared. --- include/linux/mfd/ocelot.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/mfd/ocelot.h b/include/linux/mfd/ocelot.h index dd72073d2d4f..b80f2f5ff1d6 100644 --- a/include/linux/mfd/ocelot.h +++ b/include/linux/mfd/ocelot.h @@ -13,6 +13,15 @@ struct resource; +#define OCELOT_RES_NAME_ANA "ana" +#define OCELOT_RES_NAME_QS "qs" +#define OCELOT_RES_NAME_QSYS "qsys" +#define OCELOT_RES_NAME_REW "rew" +#define OCELOT_RES_NAME_SYS "sys" +#define OCELOT_RES_NAME_S0 "s0" +#define OCELOT_RES_NAME_S1 "s1" +#define OCELOT_RES_NAME_S2 "s2" + static inline struct regmap * ocelot_regmap_from_resource_optional(struct platform_device *pdev, unsigned int index,