From nobody Sat Nov 30 01:44:04 2024 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2059.outbound.protection.outlook.com [40.107.21.59]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B001A1BD4F2; Fri, 13 Sep 2024 08:30:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726216236; cv=fail; b=JrexxLX+RD6GoFYgrAyOa0+Vv1hxLOie+aW7hRVU9tUhvPhC4YUZ47O6sVZcMU1R8L+pGG79VI2/XUqLGTeibC11vJT6K4wgVUb9Fc8y1jv5oyZ9+6dDkeZrSzDPO5CvjlsnBeVb6kHBS5u1zaXo+uJZSF2Lbv6yERfKwvTu8YU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726216236; c=relaxed/simple; bh=JyK3ywi9Ht00B6w82g3FOAv4l8N26tz0n+KvfNjPDcE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=i/HH/e6RvpR7amsmJ2vay7nuoIyRa3/SwxlB/FwYhsT3dlrjE00l4X+tyaxh4t7p9sEnaGVwxZkLsiGSYn5cvbQib/4D8dj1lzZbh3lMoDQRUtKMy2k9vGWQ6wmL7si0ixrotk4jcbzbB1Dt99IX8lSk6aBWNGnkvjY5+QmpnyY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=REffQhBt; arc=fail smtp.client-ip=40.107.21.59 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="REffQhBt" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=u57hf/hok5Uzu+ptxvjoTeKAuB4+hRiUlt82HOmC6+SQPfmF/gWzXv9IIkoO1uzR1SeHBW34ET4GpQIOLB1Y6k3UHAs8zCszcI1IWUaKjTILzeVd/vu9tPleaN/3z1RVlpLdTMYdG5XHEyBeKoqyhIouAhbdGz5POkoojcvZM2t5eWrpzCipWoe7/Sdfpv/lWjUFpBUFaV+mItB4HMI7/0d+BFO/YIVl8c6BoyFqcs2oq205bLnM0zsgbItbL1eGvi+NDf+KyTchT2AqER+AZHXUhg3zKHF2ApL7chS5ixMEfqUw3oM8vwr1WmIWjNpFOylQxhIPaRNraBDcPvKcog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=2azDZqodn8AAhlAQVoBzAcvBGio6aTaqiLcdDGJ007E=; b=R67aC3I8rRet9H9mVLO4W9F7kKTdt3G7KnAKdDRjJf+GkQptcZkGNhssYyVza39sjcb8bfCT+8om/PWpFmbh0HJqU4yYaaftj+yecoBNkUa1ckzfISyOMsbN/OCARmFKpM/P9C/dA42E0nMKB99bFQ7UgzYVXTgjsis5eMmKZrKioSy0F5ugo0mf8FWFqBlMA60nro0JHIPsEdcMv61Gqg9CkuaTPYugnHjseATjUJBC/qxACepy95EAAtPoKEjHwNeeAiBuYQQtE5vyzMjjLxyzE+C50legQMV7eR+M6H0vWdSV21JqBxaiMiXZg9IMTCh2EYKWOsJXJvMLIV/xkg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2azDZqodn8AAhlAQVoBzAcvBGio6aTaqiLcdDGJ007E=; b=REffQhBtfuo2iX7Ra6TtHFJECszgacgZoRJ5nKOJMO6ydbNSr4JVi5sjcwWX2JXaYRPh2GzGtj3mYtu1zaTSOrLuIBr1jA0eyMIq+TYtk3sh9KzOTog8WhQIggkP1IPcyHty1h61H/6Lrx6o+KUDMdopEpFMtdRWARFj2nD1UOvKVCjv8gZtY8rt1e7C7Gio3XR5we5ywdqn/9bXWwhGYdwE45XJKWoDZjUwEswpr9EkccX0Q36BB9iZglpw9JrvWZFRKR4ASRum+1GmHneU3JEnBm+XOPoL3BxMO3aqpzKZYuu++a7qdhkNa5OAMT9ew57QJbIuyB6VeQkRwTHAVw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) by AS8PR04MB8403.eurprd04.prod.outlook.com (2603:10a6:20b:3f7::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.17; Fri, 13 Sep 2024 08:30:27 +0000 Received: from AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455]) by AM9PR04MB8487.eurprd04.prod.outlook.com ([fe80::6d7a:8d2:f020:455%5]) with mapi id 15.20.7962.018; Fri, 13 Sep 2024 08:30:27 +0000 From: Andrei Stefanescu To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chester Lin , Matthias Brugger , Greg Kroah-Hartman , "Rafael J. Wysocki" Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP S32 Linux Team , Andrei Stefanescu , Krzysztof Kozlowski Subject: [PATCH v2 1/4] drivers: provide devm_platform_get_and_ioremap_resource_byname() Date: Fri, 13 Sep 2024 11:29:32 +0300 Message-ID: <20240913082937.444367-2-andrei.stefanescu@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240913082937.444367-1-andrei.stefanescu@oss.nxp.com> References: <20240913082937.444367-1-andrei.stefanescu@oss.nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM0PR02CA0134.eurprd02.prod.outlook.com (2603:10a6:20b:28c::31) To AM9PR04MB8487.eurprd04.prod.outlook.com (2603:10a6:20b:41a::6) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8487:EE_|AS8PR04MB8403:EE_ X-MS-Office365-Filtering-Correlation-Id: 6d70aecf-562f-4401-c174-08dcd3ce51e3 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|376014|7416014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?Q3RmbDljOVNuMU82NExKRklvRVRWdFZDaGNiN0g4MDRidHI2dHpzWjc0ejd6?= =?utf-8?B?SnU3S1k0NFB1dlFtZzB1UG5yOFliOU5JbTZ6ZmxzUEFBd2cxaS9Idm0wUHds?= =?utf-8?B?MXVqOXdGYVdHNGlFTWVxd0RIb2Q1Nk9UTFBFUndoWW80SkpWNVhMbDh0R1Fz?= =?utf-8?B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;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8487.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(376014)(7416014)(366016)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZGlqazdNK0kyTVdtc1NobVB5OTR2YzhaU2ZoaDhhMEY5TmNoSnh4Q3BKWml3?= =?utf-8?B?SU9HWUFPMlBOMGVQMjc2anpiVHhMOFp3TVNWSmRuOE43eVpnMEFVVmhhV0hD?= =?utf-8?B?SXp3SldJRnpZZTFRUzFmTGZCMFJ0UUtISXdtNnJScERhMFRmM21TeHNndjRn?= =?utf-8?B?NGw5NmZWbnR5OFAxdzdiNDd1YjlnOUFQZmsrVlpBZzByYW84cU9TZHdjOUlG?= =?utf-8?B?dFBDVVFTY2QrY3RyUGJ6aUZzMlg5M1BzMDNXZkhUMU8rWXRmUlFPeld6Z2Vp?= =?utf-8?B?MEppem9CdFBWcGhGMkZ4WldnYU9VTGdUMlpZUElQdFdyREZ2NmVjMzRwV21L?= =?utf-8?B?Z1RXdWFpdkRmdzZIcGNmT1hwczIxakxXK1R1QW5zc1Z2bDB1VnlMMU5OTEhP?= =?utf-8?B?Q2g5b2pNNkZXVE5veUNPNFV0bnY3a1U3eG0veFcrK0dvNU1WeDVhazM0U081?= =?utf-8?B?Zm9sREVaamdJTXpSZFNLOHY4NXAwdGlRS3kzRGlROFI1Vm9tS0ErSXhZcW9Z?= =?utf-8?B?TGIvUDh6M3JBT3NsVGpqTWk1V016alBqbjlNcVJxZ2VVQ1ZqaGtCcERMV0FY?= =?utf-8?B?OXVFaUpuOHVFZ3JQVkx2WE9ySWsrSkkxWGF0MVY4SStkUGJFaWEvNVJhb29R?= =?utf-8?B?V09hbUNMSjJNaFRiSTRPWlF6TzExY0EvdDNpNDA1aEk1RE4rL2hvY1pJdlRS?= =?utf-8?B?SnVXVWNL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?= =?utf-8?B?RzlLcmNjUElJUUhRa2ZnUzYyNmpHRTZwTHQ3WlZyTGFCMjdOM2xhYVd0K3ht?= =?utf-8?B?alhsL1RVbi9CcTYzMHBHUHg1amIrNUlickViZ3NWcVhHanpKNEZwMkIwWjF6?= =?utf-8?B?TkwxWlU5Wm5xZFd6M3NDMGtyem15aHhxaVptR2pXM3FhWHJ2ZUFiWm1iYmVz?= =?utf-8?B?eXZPV3VFQnVtTno3SjRvbnJvV29JRWtRMDRCcnFKNUNpOVFKUStSYURLRlJn?= =?utf-8?B?RXNCWHdnTklwSzZxV1JHU3NWYkRwRHJhRHQwQWY3cDIrcm1ZOGRPWlVwcGs1?= =?utf-8?B?RTVsL0lBUFZaV3RqWkw3SEtaenNPaU1JZzVJSGw1aWtkb3UwNGJpWW9zUzVn?= =?utf-8?B?NGFQcExlQnBaYUM2Zkc1RzhnSkxXb1dsRE90K2tZY25QVjhSNW0wbnl5Tm1J?= =?utf-8?B?aDMwcGtBUDRsS09tOGVtaHk2NXUrUC8rZkVVY25DV1YzZWRSMHRaZ0JOWFNV?= =?utf-8?B?VFpDODRuOXFGLy8wcERBeHQvTjFuZFhjelBNL1ZSREpwd3BFYjB1Z1g5WVpL?= =?utf-8?B?ZVE9PQ==?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6d70aecf-562f-4401-c174-08dcd3ce51e3 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8487.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2024 08:30:27.2310 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3jJrLIKY/8Q2qBU3t8bfbIvUnwCW9dffIpkBGoCowRPVYoxTn0MDqNJaZLeEZbs3p2EE2K9OLCRaYP9kHYAhZ2RrrddZKn+tiU/RIkDOfOI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8403 Content-Type: text/plain; charset="utf-8" Similar to commit 890cc39a879906b63912482dfc41944579df2dc6 ("drivers: provide devm_platform_get_and_ioremap_resource()") add a wrapper for "platform_get_resource_byname" and "devm_ioremap_resource". This new wrapper also returns the resource, if any, via a pointer. Suggested-by: Krzysztof Kozlowski Signed-off-by: Andrei Stefanescu Reviewed-by: Matthias Brugger --- drivers/base/platform.c | 28 ++++++++++++++++++++++++++++ include/linux/platform_device.h | 13 +++++++++++++ 2 files changed, 41 insertions(+) diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 4c3ee6521ba5..ab48c02fcb2c 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -108,6 +108,34 @@ devm_platform_get_and_ioremap_resource(struct platform= _device *pdev, } EXPORT_SYMBOL_GPL(devm_platform_get_and_ioremap_resource); =20 +/** + * devm_platform_get_and_ioremap_resource_byname - call devm_ioremap_resou= rce() + * for a platform device and get + * a resource by its name instead + * of the index + * + * @pdev: platform device to use both for memory resource lookup as well as + * resource management + * @name: resource name + * @res: optional output parameter to store a pointer to the obtained reso= urce. + * + * Return: a pointer to the remapped memory or an ERR_PTR() encoded error = code + * on failure. + */ +void __iomem * +devm_platform_get_and_ioremap_resource_byname(struct platform_device *pdev, + const char *name, + struct resource **res) +{ + struct resource *r; + + r =3D platform_get_resource_byname(pdev, IORESOURCE_MEM, name); + if (res) + *res =3D r; + return devm_ioremap_resource(&pdev->dev, r); +} +EXPORT_SYMBOL_GPL(devm_platform_get_and_ioremap_resource_byname); + /** * devm_platform_ioremap_resource - call devm_ioremap_resource() for a pla= tform * device diff --git a/include/linux/platform_device.h b/include/linux/platform_devic= e.h index d422db6eec63..ab7f33f3c426 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h @@ -68,6 +68,12 @@ platform_find_device_by_driver(struct device *start, extern void __iomem * devm_platform_get_and_ioremap_resource(struct platform_device *pdev, unsigned int index, struct resource **res); + +extern void __iomem * +devm_platform_get_and_ioremap_resource_byname(struct platform_device *pdev, + const char *name, + struct resource **res); + extern void __iomem * devm_platform_ioremap_resource(struct platform_device *pdev, unsigned int index); @@ -83,6 +89,13 @@ devm_platform_get_and_ioremap_resource(struct platform_d= evice *pdev, return ERR_PTR(-EINVAL); } =20 +static inline void __iomem * +devm_platform_get_and_ioremap_resource_byname(struct platform_device *pdev, + const char *name, + struct resource **res) +{ + return ERR_PTR(-EINVAL); +} =20 static inline void __iomem * devm_platform_ioremap_resource(struct platform_device *pdev, --=20 2.45.2