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: "Suthikulpanit, Suravee" X-Patchwork-Id: 57904 Delivered-To: patch@linaro.org Received: by 10.112.147.194 with SMTP id tm2csp254172lbb; Tue, 8 Dec 2015 12:20:47 -0800 (PST) X-Received: by 10.98.14.129 with SMTP id 1mr7210261pfo.161.1449606047271; Tue, 08 Dec 2015 12:20:47 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f2si7195739pfj.59.2015.12.08.12.20.46; Tue, 08 Dec 2015 12:20:47 -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 S1752762AbbLHUUX (ORCPT + 28 others); Tue, 8 Dec 2015 15:20:23 -0500 Received: from mail-by2on0055.outbound.protection.outlook.com ([207.46.100.55]:2304 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752653AbbLHUT0 (ORCPT ); Tue, 8 Dec 2015 15:19:26 -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 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: , , , CC: Lorenzo Pieralisi , Will Deacon , Catalin Marinas , , , , , , , , Suravee Suthikulpanit 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/9s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rZwgyg/uFQ5BgKpJpmUoa8GBnuzuOnbr5UygS+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 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 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