From patchwork Wed Oct 14 23:25:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suravee Suthikulpanit X-Patchwork-Id: 7399211 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3211EBEEA4 for ; Wed, 14 Oct 2015 23:28:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5620F209D4 for ; Wed, 14 Oct 2015 23:28:17 +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 7D722209D0 for ; Wed, 14 Oct 2015 23:28:16 +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 1ZmVRW-0006I0-6j; Wed, 14 Oct 2015 23:26:46 +0000 Received: from mail-by2on0082.outbound.protection.outlook.com ([207.46.100.82] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZmVRK-0005vp-4c for linux-arm-kernel@lists.infradead.org; Wed, 14 Oct 2015 23:26:35 +0000 Received: from CY1PR12CA0066.namprd12.prod.outlook.com (10.163.230.34) by CY1PR12MB0714.namprd12.prod.outlook.com (10.163.238.20) with Microsoft SMTP Server (TLS) id 15.1.300.14; Wed, 14 Oct 2015 23:26:10 +0000 Received: from BY2NAM03FT034.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e4a::203) by CY1PR12CA0066.outlook.office365.com (2a01:111:e400:c42b::34) with Microsoft SMTP Server (TLS) id 15.1.293.16 via Frontend Transport; Wed, 14 Oct 2015 23:26:10 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.222) smtp.mailfrom=amd.com; apm.com; dkim=none (message not signed) header.d=none; apm.com; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from atltwp02.amd.com (165.204.84.222) by BY2NAM03FT034.mail.protection.outlook.com (10.152.84.211) with Microsoft SMTP Server id 15.1.300.4 via Frontend Transport; Wed, 14 Oct 2015 23:26:09 +0000 X-WSS-ID: 0NW8H3E-08-IVL-02 X-M-MSG: Received: from satlvexedge01.amd.com (satlvexedge01.amd.com [10.177.96.28]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by atltwp02.amd.com (Axway MailGate 5.3.1) with ESMTPS id 2FE1ABD88D5; Wed, 14 Oct 2015 19:26:02 -0400 (EDT) Received: from SATLEXDAG02.amd.com (10.181.40.5) by satlvexedge01.amd.com (10.177.96.28) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 14 Oct 2015 18:25:53 -0500 Received: from ssuthiku-fedora-lt.amd.com (10.180.168.240) by SATLEXDAG02.amd.com (10.181.40.5) with Microsoft SMTP Server id 14.3.266.1; Wed, 14 Oct 2015 19:25:49 -0400 From: Suravee Suthikulpanit To: , , , Subject: [PATCH V2 4/6] irqdomain: Introduce irq_domain_get_irqchip_fwnode_name helper function Date: Wed, 14 Oct 2015 16:25:54 -0700 Message-ID: <1444865156-9870-5-git-send-email-Suravee.Suthikulpanit@amd.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1444865156-9870-1-git-send-email-Suravee.Suthikulpanit@amd.com> References: <1444865156-9870-1-git-send-email-Suravee.Suthikulpanit@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.222; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(428002)(199003)(189002)(77096005)(5008740100001)(46102003)(92566002)(50466002)(2950100001)(189998001)(36756003)(48376002)(5003600100002)(47776003)(5003940100001)(64706001)(87936001)(106466001)(53416004)(76176999)(105586002)(19580395003)(50986999)(101416001)(5007970100001)(5001770100001)(19580405001)(2201001)(97736004)(86362001)(50226001)(11100500001)(229853001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0714; H:atltwp02.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0714; 2:1PcNR3bgWRKalszIesFko4CnD4I93NS9MVNWtmdjBtaVXuH0ImcFKk5II45plV7Pb3STxICMa9eOgd4KVzfTbFAf+9sSB1Hr3CreLDjn0JFUAsQYFxs37NO7fHcJW9DSUkPqKeDfe0tnui8YEKe+nLM92HGE/MEYXDsNYWXJn/U=; 3:G5yWCo8GJJfKJJg+8Pb/cVMFWOTvc3CCMcTLPfG8LyYebdnslO57JBdEZHG6RcW+oAAGNxfmdeHy8lw57faGJwVejnc8jS0djzqX7ANnuibXfEgbLE4wmPy0/PrGni2Hv+BGvFDirSjlqwebntVDsOhfWPCC4JYmtOzntm//ivRd3fyvj6FNhkAOGBiw3fBwDy7o9ns7OKtTRFYdDYnHOO+2b5Lh6/ee/MtRzh3kMJTT5htuhj2YGW61PVOed7Q3; 25:Rc3h70Vl3yyN2Bu8yRKhuCCNT9dOmNbRIBffFFAOGX/TXjaoBHvQh5wUqZKpNOXiE4rcMfaXNqA/mBVez09VODyRnfAx9IcZ7WwvztPw53M4YaOD2zWhtuTVec/sA6I5N6ETfnooANVlLZsAKIZ6E+a2WVQg4a59BTUoh2yQ8nwMmJt0QmNz5gyigP6uEm/xW5hqtLKQkt7cob1zf9LFzph9mOi7MCE+iO8M/7ZlwUGGbE8fSOKXCxJzuBVa2n1oSE3vvSYDmT+bf/6SE5jWSA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR12MB0714; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0714; 20:tM05g9TMo3wzuVuM2KphdyiSk6vannbg0PLxz9f4TPW51TqdmszO2BM+cGI1Kwx8ExJP5DyHXc5yFN4OQbTq6jOGccY2Vk1H+8sS6ULVSbflQPmLcLdxE07MZzMDHdPAUGwI/mLj1O5FksdjJ2kVhqqCfac8xFWZhtbXUTlNAtGk1yOgWETijKrI/EWS/7KyrX2TwN8zxx1W7OkUBjDD+giC3wG0pKFgGc2UQeaV7D2ZOFN99w08ZGLLyvj3QsRrfXgM13Pdz8rQix52Kx5JFg7C78xEt3v1Jdp6v0/sSe7X7kPod86aEpMyUaZHErknvO5nJlc680eUSloD+FFOgZ2ysWlVQ3Xl4FGIjdYOSnpB2JN9W1LmUohtcwHL2iOlAarXlFO2DMd5422mLx7beNH+sqjJ0lqhfrks2WeGKZMalhJEHJeljD8ebyGsZOv4YxIvao4ktQESacB53RSBG20TJFMIwHvI86giLzRkblCjiGUhNBZNjRBosfmfWcI+; 4:GbYxQbfcwy7kxeWGh+N1jp1RWvpjVQFllZ7VdyAZLpYMiznCu2I2I53PijenUuv4nJFT2MhttMuOiNfw08bpS+fh/y7uo4pC+cydj06168yCOs0ziLttLU+ed4PqDzRoM216nC9lQfvcOyy5cHI3w7dwg43Koq3rYs+wiSo/pzC+AFp+dbRDqob7htqnVgkiGSOb69LoWayzor64/8pRqt0lnvhdBbgyxD4wfXsiPn+NN5ioIx2QwHsh2Cznwz0feuYec7E80nrkrHDqHfoLLO4tF/vwMCrODoFF8kARY5AQIxg9Vr3xN7rpnF3PGNFtMzxGjFiNuOUF1GrgqUrLKF7k+nob9/vQEyiO0qoGP5I= 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); SRVR:CY1PR12MB0714; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0714; X-Forefront-PRVS: 0729050452 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR12MB0714; 23:+gpTFA4NA+cParxY4VkRKauIt+gxKxjhUtsYeSn0j?= =?us-ascii?Q?fQCWNKltI11yjfysjOX7o7rj4XTQdT+3goGp86Pa+qCm+3suO5isSE+xXfvD?= =?us-ascii?Q?ijXcA8qdqbCGnmjsBELdJEbIe9K19q4APTb7fvVaF18KO9/3UgCEDXFbL4cs?= =?us-ascii?Q?AH5+tHDS+Gw6wypv/lANLR5vj6VhYVTJj8D6zcdET+rUG1ZERkuFZn5izvAN?= =?us-ascii?Q?krkhfEg6PeenUvAvx5i72iaH5zftuMjk47ivpfQN5la6XcZxoF2NuF1g0ZPD?= =?us-ascii?Q?GEy9qjiT7H7ZWtOe0RRuVssc9CeoEYwKJgIBCkYHZIDsLu8dFWDB5mbt2DIE?= =?us-ascii?Q?DpchPGr31yYLqkkxEl++jkZkW6uhS+5P3JqgIrt6zcujtUHlmETiYCyNiCbB?= =?us-ascii?Q?xYVTNlNAxC6yJn6K/cLEWm7u1pnXtcFzz2oOmEM8Vz5J71YneoHmJnVyo35D?= =?us-ascii?Q?JoF1qioh8tTDIIiMLTn4juZglV5qofvg3I9JFpoEQGUN8Fi79FqQKw3V/dHw?= =?us-ascii?Q?gdFdJ2vcG/wXp2vXqo7sHmOHRwTErr49DH4tYG9NZ/dpedOnezYJbkie/m0Y?= =?us-ascii?Q?KeO/3FDNEqo5/hPnXZijgpWN76dJ+40LjWxO1G+OB7d3D9XkBF42ZzGKWLwK?= =?us-ascii?Q?htydL8+iFpxV+ts5DuobAj3Ozsr1qjIenVPs0ul11dheKhbnWWqBi9SRSdoF?= =?us-ascii?Q?CtuQRwS+yyAUANJ1iIhu+PMY/oaz836VBe3xNVGvXfOhC3kIyTk2WTDrxYVv?= =?us-ascii?Q?yu/vGvx6IzBLday6sYgZ3OPtATnKy3g8Ys0mCWyu4TXeMooj5TIgs7qdOT6f?= =?us-ascii?Q?TSP36fZWnlo88rqvC0NPfki/N8yppV6JBhLt0il1LXp3YDkU6JBCNd6gl6nj?= =?us-ascii?Q?xbc6saCwoQ+V/aCiZYoC9pyDqmtTiSdVdeCBYy3FQ6XZ1A3bFJOOnvoltXqO?= =?us-ascii?Q?dkRtohaOAecwbb+Cjd2BID9PRbAh89nWlyV7rVif6gsHxNNfovTTsrD9dduV?= =?us-ascii?Q?zE=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0714; 5:ghWiUiRHdXeDuB8clN0lZHTW1/v5cxEdUxPri3UmREgEd48FmfULPEDe19cvG2HM+q/7Z/R7l0i9lk8utH7iPP+2wR4v/VWQx6UnEIG+mQaWwfTmapVTueKSrwTkoad2AIbmiE6RmpeG4e9STGVC8Q==; 24:jYwEyb8HIXPqZjY/3noshkxpy68vGG6vDiL4/d3gGJo0jgPdk0mEGT8DuRq8oly4wpwcICBGGLWWnkKSi8BIglfAzNk9cysbi7Znh30895I=; 20:aXlkDHulbABEpTpBdlrmYx+3Zyd6AKlULaoDIN3hpsVK47tT41Lh6x4DNkDnsdPZKI0d70hsd2nm0m4g1kSSGRYuo3hcqMtNxZw2vD0i2b0nPe6iLd+INFvu6DlEA/GsrlH4371C6cFx8jbzwpMBJ1GvbvWQkT1wXhIeFLNPh36x7aMRaL4fjmoiuRk6neQCt3vUL9LBVlMujNgDbSNUMxZbGJ+8hvdYgIxl/Z+cC5WXxCaiLE2vXkcIEpXMB6xU SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Oct 2015 23:26:09.3752 (UTC) X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.222]; Helo=[atltwp02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0714 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151014_162634_329406_C8B81322 X-CRM114-Status: GOOD ( 11.56 ) 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