From patchwork Tue Dec 8 20:19:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suravee Suthikulpanit X-Patchwork-Id: 7802211 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F1A489F1C2 for ; Tue, 8 Dec 2015 20:22:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1BBED203A4 for ; Tue, 8 Dec 2015 20:22:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3C84420398 for ; Tue, 8 Dec 2015 20:22:10 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a6OkF-0002tL-Gv; Tue, 08 Dec 2015 20:20:19 +0000 Received: from mail-by2on0077.outbound.protection.outlook.com ([207.46.100.77] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a6Ojh-0001kr-1u for linux-arm-kernel@lists.infradead.org; Tue, 08 Dec 2015 20:19:45 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Suravee.Suthikulpanit@amd.com; Received: from ssuthiku-fedora-lt.amd.com (165.204.77.1) by CY1PR12MB0443.namprd12.prod.outlook.com (10.163.91.21) with Microsoft SMTP Server (TLS) id 15.1.337.19; Tue, 8 Dec 2015 20:19:23 +0000 From: Suravee Suthikulpanit To: , , , Subject: [PATCH v4 3/5] irqdomain: Introduce irq_domain_get_irqchip_fwnode_name helper function Date: Tue, 8 Dec 2015 12:19:03 -0800 Message-ID: <1449605945-10707-4-git-send-email-Suravee.Suthikulpanit@amd.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1449605945-10707-1-git-send-email-Suravee.Suthikulpanit@amd.com> References: <1449605945-10707-1-git-send-email-Suravee.Suthikulpanit@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BLUPR01CA061.prod.exchangelabs.com (25.160.23.51) To CY1PR12MB0443.namprd12.prod.outlook.com (25.163.91.21) X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0443; 2:ywh3JDmEYXHfqOd+278Zkd7mS6ZWfbJdVY4FQ/1pNMygF8WgVGvArcKeX6cyAwwEXGYcHkpPhR+lzdWkY6UHrNb+z0KYaE4Hz3ICvtcQAaa6yuWU8ZYcS+LI6XgmRVg4KHcFuu1/JwAI9pd0TnwzkQ==; 3:6yQXSdohdqIFARypR/QJMxbICZZKuakXQGlCYeaga3Z62BfQr8C0uiy5aXGDKV/NoU1WRARnGO9XtrNfNiqUi/5L0mTgIRNFsNkZlaf1jGNX66QWdQ8X6gZEnysric+U; 25:Bysye0MvQiB+FGf/dwSDaeNfbGHTrMoiofHJfP2qVgbURZ5WWc3jVT7y+Rv+6u53mDxPswCKM6fbbqFu6ZLEIGckHDDuNgiCRcX1NsXsqy308wnFl3ogY2tc+qaqXzp22Rk8W1evfetcr4yfMZIoowJjJPXVSdFYIptbrAqHIOclg8kkEXhJPFp1+h0tyen4f4QZ4Qtxdu8CZTGjfZB/n92UZNWaHQkpU8ygreQRupQii6R8JY0XqNE5+ZSie8tPVbjBxFmy00f5NycWRGXicg== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR12MB0443; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0443; 20:/EOTKjaKtMyIpbSF2VBlXNi6vxpTjBH8aZbulJAbxVYJnhvegKf5WAUnwOhg8mSXZQY63x8ENYcUCQmN61esiuBB3fXyFlY09roJQt1ezU9MUBLn3u8M5znVcxnmZKqr7KPj+L0FELjfxM/hVCqtO4pz132w/JifvrLy2QuBW9Liwjm+YxQ1LyJ0xM0vuCIeWbzn/FXHXlY2/14ksjoREzLo1bwULI57qZnpONZxZ0st6p/rY5PnGMmOnJvaE28o6wJrVXJlJixUqxW9ELN1dqaITlCHNniNYxKYk3Tl5smVpl++WmpBaJmOs+XCw1shC2+b7OkYNKf53rARpiiqT2wzaZfZDa9HGYLkvqMNWf5tRmUPRbTz5ezAsXzYKtA2d3AV0TR5VSgns/RzKuzsMRLnySRaWzRzcvmVhMti6UcNVjVOV1HZQ9X6vHc2Se8wxJA5SWEbd1PzlMEE7oFhuaD7X450EybibRvEAiBRYHNWi5XyrhjZ4vv3UsCrpBia; 4:QjL9jzD0wAIwNzNFPih+6+U/ky45PTerIMvy7zcbteeHrFoVr/BiNjQ1PV6VMC64d0dIwmO5F8rs5Bnx55UtdS28C5mO1ktgvP3SfP/92Mu2Boo1+i7Mxx52aorRZPO+BH0TEK8WgpWMXw36ncpqWFnWdyAFppuuZDi9I1ZBT//QcchsKQm3Fc88jMaIeWjBVEYeqOSMvcRgCCHCkYM6iMEjakgBM4Mvp/2bbvwp/uCGCglrnc6bNKk374WYqOU3A+N408ysa4uBeAbJd/u9Xib827mEciEpU9Q6Hdj31/OJppXqVy2njGLrO/1X6tXTvTaAh4s3t3em235MLoyGb/r///giAGndI/Yhpzz/+nqjv4gjBh17/zFPl6pogrCcY+oNHEoscSnWvWgOVxl7xGwlfuA01IPmk2sZHrWMdOI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(520078)(3002001)(10201501046); SRVR:CY1PR12MB0443; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0443; X-Forefront-PRVS: 0784C803FD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(189002)(199003)(76176999)(3846002)(6116002)(87976001)(5003940100001)(5008740100001)(48376002)(122386002)(189998001)(77096005)(2950100001)(586003)(5004730100002)(105586002)(229853001)(1096002)(5001770100001)(106356001)(19580405001)(53416004)(36756003)(42186005)(50986999)(50226001)(19580395003)(2201001)(97736004)(86362001)(47776003)(40100003)(50466002)(66066001)(101416001)(92566002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0443; H:ssuthiku-fedora-lt.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR12MB0443; 23:s2H9xqIW7sgBIpZ5yaOGfEr9TVB97gIga4tsHzhYh?= =?us-ascii?Q?LbB/Npx6+L13+hd8oOxGVjmwDrxf3tzt75dJ3potdTMq4mEHPGVWvzQlupnw?= =?us-ascii?Q?ys8y31w9bzZ5pm/r8bFHK2KRqq5PylwyAdlY0D2Mhbip28eE/v6lq4cIWgxH?= =?us-ascii?Q?0xk46hgze09dX25GbGlRWbq2Cv0xVC++nEfoDdyO0PRzCf1FKkuTqbnh8aBI?= =?us-ascii?Q?WIprwRUrCUEwJaekcx+rRF4HE0uSqN3PV7FIOegoZSqUY7ypEtZRK1oG+Pic?= =?us-ascii?Q?TzSXJMgNaS3LciQCzNkskELkC/4TPn23iWFtwiVPPv/OOkR/js4zk3Nb9Ksi?= =?us-ascii?Q?ku/IgdZM7OSyhUVFrT6CLubgZW4j1eKJNS+52forgsudiMXK29Io8l9qBKYA?= =?us-ascii?Q?iVvaPNGJQEEdnGALyarDhy55h8N3/HCug2DwidaNm9Zllu0xSHb09JcqBB++?= =?us-ascii?Q?lHGvJrC4tNynpJyZaITjnnhqYfRLcRuSL3z/Kw+6P0ZZw0bc4efzM8XBpyd/?= =?us-ascii?Q?kg3rQhtKpjH9z9+6Zu/9sTL3dIaiuLxkIn1kxM1jCn1CZskD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uzuOnbr5UygS+BA5OGTW7Gpna9lGqbCMPSpMZc+qKGXRwsd3oSB4e15FvHJ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2015 20:19:23.2321 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0443 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151208_121945_350395_791E2AAA X-CRM114-Status: UNSURE ( 8.62 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lorenzo Pieralisi , graeme.gregory@linaro.org, Catalin Marinas , dhdang@apm.com, Will Deacon , linux-kernel@vger.kernel.org, tomasz.nowicki@linaro.org, linux-acpi@vger.kernel.org, hanjun.guo@linaro.org, Suravee Suthikulpanit , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds an accessor function to retrieve struct irqchip_fwid.name. Signed-off-by: Suravee Suthikulpanit --- include/linux/irqdomain.h | 1 + kernel/irq/irqdomain.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 4950a71..006633d 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -187,6 +187,7 @@ static inline struct device_node *irq_domain_get_of_node(struct irq_domain *d) #ifdef CONFIG_IRQ_DOMAIN struct fwnode_handle *irq_domain_alloc_fwnode(void *data); void irq_domain_free_fwnode(struct fwnode_handle *fwnode); +const char *irq_domain_get_irqchip_fwnode_name(struct fwnode_handle *fwnode); struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size, irq_hw_number_t hwirq_max, int direct_max, const struct irq_domain_ops *ops, diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 7f34d98..a8c1cf6 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -79,6 +79,24 @@ void irq_domain_free_fwnode(struct fwnode_handle *fwnode) } /** + * irq_domain_get_irqchip_fwnode_name - Retrieve associated name of + * specified irqchip fwnode + * @fwnode: Specified fwnode_handle + * + * Returns associated name of the specified fwnode, or NULL on failure. + */ +const char *irq_domain_get_irqchip_fwnode_name(struct fwnode_handle *fwnode) +{ + struct irqchip_fwid *fwid; + + if (!is_fwnode_irqchip(fwnode)) + return NULL; + + fwid = container_of(fwnode, struct irqchip_fwid, fwnode); + return fwid->name; +} + +/** * __irq_domain_add() - Allocate a new irq_domain data structure * @of_node: optional device-tree node of the interrupt controller * @size: Size of linear map; 0 for radix mapping only