From patchwork Wed Dec 9 01:48:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suravee Suthikulpanit X-Patchwork-Id: 7803281 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 3267F9F349 for ; Wed, 9 Dec 2015 01:51:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5586520453 for ; Wed, 9 Dec 2015 01:51:07 +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 78A09203FB for ; Wed, 9 Dec 2015 01:51:06 +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 1a6Tsd-0004TA-TU; Wed, 09 Dec 2015 01:49:19 +0000 Received: from mail-by2on0075.outbound.protection.outlook.com ([207.46.100.75] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a6Ts7-0004HX-94 for linux-arm-kernel@lists.infradead.org; Wed, 09 Dec 2015 01:48:48 +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 BY1PR12MB0437.namprd12.prod.outlook.com (10.162.147.139) with Microsoft SMTP Server (TLS) id 15.1.337.19; Wed, 9 Dec 2015 01:48:26 +0000 From: Suravee Suthikulpanit To: , , , Subject: [PATCH v5 3/5] irqdomain: Introduce irq_domain_get_irqchip_fwnode_name helper function Date: Tue, 8 Dec 2015 17:48:04 -0800 Message-ID: <1449625686-5594-4-git-send-email-Suravee.Suthikulpanit@amd.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1449625686-5594-1-git-send-email-Suravee.Suthikulpanit@amd.com> References: <1449625686-5594-1-git-send-email-Suravee.Suthikulpanit@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BLUPR05CA0068.namprd05.prod.outlook.com (10.141.20.38) To BY1PR12MB0437.namprd12.prod.outlook.com (25.162.147.139) X-Microsoft-Exchange-Diagnostics: 1; BY1PR12MB0437; 2:wa1vhYGAHL+vhEaPh1Dewbloz711bFOLIP4O8OinjKqf94m603CIssiiGi4jDhyfJ53bxObs5+OBynf2SqbTR8vOxwyv1HzkcPZyQqa3s41vUePzWCvGkBh/oEdKkI/zGqxwUD6Z1kOUl7hlL9/UDA==; 3:IUaRBzmcompyYRzCSr/ZrB7/lvfZcWQR86RhmlFkG6xjFkl7MY+YeTJDuUELSC4ZZV5hTcnVKz3o3JJ9XmVsoc+Ht1nz2VKeiXU9YKDoUaesI2t0txxy1A8viPpuNL2E; 25:CrEA5rjWqOlIOxJLSBZWS6Xlw+3lfBNypHEdiUx6J18Xi7lLln7Wd7CiT7hv5tbvW1X6V4TDExkB1rtx7fCB1U/mTrgUa+gx44w3/5CCRAzqhshXyRouJ2jQF0Y0PVfnDGRlLeeLJN3ilv17OZwQXpVS8EefiDNjqAinBb2jeQzzrO1hyeYHqEu8/bEMpaBqdYTe7RBy+2RKkl/862PxorkTn5JpfjIGK6xCg03r4WkT6zDDjqVe1rVRku6E5FeCQTHS1Mp/1PBut/S/Inef9g== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR12MB0437; X-Microsoft-Exchange-Diagnostics: 1; BY1PR12MB0437; 20:8WfBCQRhzCZ3NGOvO7GrzO2n9SBj5x438DAiG4d3bjHzaqp/LPXMrPE5HbuTN7PfUTcZzsJjw0ioiWJ/rRy9lAQFWtFUVIWiRiNL8RaxGQPlQJIr2O34Ol0p3ZLFk9SyWmZlmlV1UjgwsBlSY8QUZIkn1Okz4Yi+l7FiqHz7OYGc/skmj9eML1iybLFCPsTdj7TFl/empWEqPEozx9cmXdpQYKSeS4Rzr5oWnh+rNLeqa9IPjzHj/5kDtbgQ3qsoMSTPH1a4caZGLYamzMcblfzTaq0SKECZddUER5zJd8EuR07+WHnU7zNb6WDb3BAxz/su8IRXANjm1P5eX7ytFHnxShpf3UmiPDqdKxggHpMn0O0kEYDLOPFjclhDHEHenPnTAeR8A3scPGyqComf7/T8igcIJfSF02RtytLaw4XQSl0ZhAiCszowmt5tdfkEmBEQK639SUfDCuFiAofL3zR1TFm06bcrecLNbf9rVzlk0RtLQ9IlclH12SfaefHk; 4:AsA/LqTOuI7DdPKhS6m5VXNBRjaMDt8l4AOWLWohFZfdiskUFA0cWS/cBPhJBfu+aTwWfGEcKBWvnMMAZaW3HVP7Gbmbqlk5TxiqJlMl0DCWmAM+YGUbOHg8jJ+a6zFewTEtb0Mj2IGR8YJrYaW3E+D6ro1CaVEHXQ4RTCgAy8BNzcPz+Fa+O6X+YH2CbspZ4LqNTy1fnkpF2o9XZs7a1A0e54QhulSbd2Lhr+ZGL1bseH7FdaK/GTM5DphFNSZaYQ/hbSFqQZwbACzR/NxcrYOgPD5iS+IrtDhqrKcCqPv8JrgAJLbn5q9Duss6bV/wB6Ols61Nj1VCbNzV+aIE4gVQYZ12YDwFxaAGRD1TmRcXnDV73ijdrqmGSyFHVC3d7bbcAEQr9SETybE3XjtWQKSygucYoN6JG2scrSGcTUA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(3002001)(10201501046); SRVR:BY1PR12MB0437; BCL:0; PCL:0; RULEID:; SRVR:BY1PR12MB0437; X-Forefront-PRVS: 0785459C39 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(189002)(199003)(36756003)(77096005)(575784001)(2950100001)(86362001)(229853001)(92566002)(101416001)(53416004)(122386002)(97736004)(2201001)(42186005)(87976001)(5001770100001)(19580405001)(5004730100002)(50226001)(48376002)(19580395003)(1096002)(47776003)(189998001)(50986999)(66066001)(5003940100001)(106356001)(5008740100001)(6116002)(50466002)(3846002)(586003)(76176999)(105586002)(40100003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR12MB0437; 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; BY1PR12MB0437; 23:tMwgAIyAH3AYLf23oDi2acUKAaF/Y8xljZo24Fzj7?= =?us-ascii?Q?23L7YdrD9JeEzQflffSDj804+E+g04Ple5KpynPI0ANcZ7KJkzc7NuzZvrkY?= =?us-ascii?Q?VAkeSWUjgGAeK2c3ptAIXCNIBN2fZFqMAFQgsL4QJdNizRbXFpbo+d6JuA1G?= =?us-ascii?Q?rVixsWHAXnR7yOVnDWXztiZbUaGxbuShLhFNmOYr5RYRMqjVGbksjnlRxeTO?= =?us-ascii?Q?vvFFx3C2oJk6vUtstHjDRIj35Qr5u6CDv8vtaidIIz/eaRLXUoCfkRnhBaf4?= =?us-ascii?Q?XJROsqMtSGvBGytZITLlgXRAMTiPN8Nvq/QN/X+hE9HgkhMX3+isAysm3lE7?= =?us-ascii?Q?/C/RtPICkVa+ydi1QfO0rhHDIgEaya88lOKZpgrHLdUP3A0dxOmG2zu0yUQW?= =?us-ascii?Q?q/xtfxhu+35jYuP3w7g1akKpMZLkAhJIYi+Byy2l8TAAOIwQe0Snv3nr/zmj?= =?us-ascii?Q?F27hOw4+DDOtbEDLESHistOul26M6wf6wYzrvnB/ip5CiEMjzS/EDlNdNVPy?= =?us-ascii?Q?LSq2R5CCJUgPM0FgMcH8Zq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mvo9cxQ3VZFlPY3VvZZcwzr7Dh6GTjM8mw7bRuNsMt+2Azh5IUeiE/ynAlYSwUby4eqcSCo+WZD6pBc4DIhbCdEbfiHJu/58R X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2015 01:48:26.8035 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR12MB0437 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151208_174847_483513_C04CD809 X-CRM114-Status: UNSURE ( 8.92 ) 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 d72fabc..c0a95a9 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