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: "Suthikulpanit, Suravee" X-Patchwork-Id: 57915 Delivered-To: patch@linaro.org Received: by 10.112.147.194 with SMTP id tm2csp385250lbb; Tue, 8 Dec 2015 17:49:21 -0800 (PST) X-Received: by 10.98.16.133 with SMTP id 5mr9375194pfq.150.1449625760536; Tue, 08 Dec 2015 17:49:20 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rx5si8829754pab.151.2015.12.08.17.49.20; Tue, 08 Dec 2015 17:49:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752877AbbLIBtQ (ORCPT + 28 others); Tue, 8 Dec 2015 20:49:16 -0500 Received: from mail-by2on0095.outbound.protection.outlook.com ([207.46.100.95]:36460 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752611AbbLIBsa (ORCPT ); Tue, 8 Dec 2015 20:48:30 -0500 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: , , , CC: Lorenzo Pieralisi , Will Deacon , Catalin Marinas , , , , , , , , Suravee Suthikulpanit 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-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mYsMoiGWbWkueBTXPrr/RgCsBQVqNfZmvo9cxQ3VZFlPY3VvZZcwzr7Dh6GTjM8mw7bRuNsMt+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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(+) -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ 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