From patchwork Wed Oct 21 18:47:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suravee Suthikulpanit X-Patchwork-Id: 7459521 Return-Path: X-Original-To: patchwork-linux-acpi@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 5D5119F37F for ; Wed, 21 Oct 2015 18:50:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 72AF52053E for ; Wed, 21 Oct 2015 18:50:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6DF8C20437 for ; Wed, 21 Oct 2015 18:50:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753646AbbJUSu3 (ORCPT ); Wed, 21 Oct 2015 14:50:29 -0400 Received: from mail-by2on0083.outbound.protection.outlook.com ([207.46.100.83]:52032 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755268AbbJUSuY (ORCPT ); Wed, 21 Oct 2015 14:50:24 -0400 Received: from CY1PR12CA0057.namprd12.prod.outlook.com (10.163.230.25) by DM3PR12MB0860.namprd12.prod.outlook.com (10.164.7.142) with Microsoft SMTP Server (TLS) id 15.1.300.14; Wed, 21 Oct 2015 18:50:22 +0000 Received: from BY2NAM03FT007.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e4a::207) by CY1PR12CA0057.outlook.office365.com (2a01:111:e400:c42b::25) with Microsoft SMTP Server (TLS) id 15.1.306.13 via Frontend Transport; Wed, 21 Oct 2015 18:50:22 +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 BY2NAM03FT007.mail.protection.outlook.com (10.152.84.70) with Microsoft SMTP Server id 15.1.306.8 via Frontend Transport; Wed, 21 Oct 2015 18:50:20 +0000 X-WSS-ID: 0NWL2VN-08-3RY-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 2A076BD8902; Wed, 21 Oct 2015 14:47:46 -0400 (EDT) Received: from SATLEXDAG01.amd.com (10.181.40.3) by satlvexedge01.amd.com (10.177.96.28) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 21 Oct 2015 13:47:57 -0500 Received: from ssuthiku-fedora-lt.amd.com (10.180.168.240) by SATLEXDAG01.amd.com (10.181.40.3) with Microsoft SMTP Server id 14.3.266.1; Wed, 21 Oct 2015 14:47:48 -0400 From: Suravee Suthikulpanit To: , , , CC: Lorenzo Pieralisi , Will Deacon , Catalin Marinas , , , , , , , , Suravee Suthikulpanit Subject: [PATCH V3 4/6] irqdomain: Introduce irq_domain_get_irqchip_fwnode_name helper function Date: Wed, 21 Oct 2015 11:47:27 -0700 Message-ID: <1445453249-32557-5-git-send-email-Suravee.Suthikulpanit@amd.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1445453249-32557-1-git-send-email-Suravee.Suthikulpanit@amd.com> References: <1445453249-32557-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)(189002)(199003)(87936001)(229853001)(101416001)(53416004)(46102003)(50986999)(47776003)(76176999)(36756003)(92566002)(5008740100001)(189998001)(97736004)(5003600100002)(105586002)(77096005)(2950100001)(5001770100001)(2201001)(11100500001)(50226001)(106466001)(5003940100001)(19580395003)(64706001)(48376002)(86362001)(19580405001)(50466002)(5007970100001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM3PR12MB0860; H:atltwp02.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DM3PR12MB0860; 2:vrogx/CLf3C30nLWjel7ENpfhi/aY/cJf8e3K3sPALwDlD0SgPlrFc1FwOvOEH81noN98bzYgGsLE/YCTx1wI47qgBnWM+ablIxoBOUbPalAMvDHwBZkLsqYzT5Dqhu6mflPf2tEnoXV1GHHdrlWcjNjK78u7ULSImFO3gVy/CA=; 3:0ZL+vUjktCSTXcir6g4OUA6zmL8av0mXJHogyVfWu8dmpZUgoq8aCbTQNdmoAhFclZ81NHGCBH3/l1tlrHlOsGqk5eGGci2P4GXVHtCXvEbi+JpuPkUiY4/NywPAH6mFV6K/5oCQjtLoHNAHCBSRhFmT9pmxvi3wMznkAPjrXC1IvYQJqYtjXvjIRcSP+pAlC52w8KenCu2vunHMGdeFCZxsEKEBdFaZhOVhvxcSdnORFKlTAdLfauE3qST0eQu1; 25:y9e3xqgTHNMJww1p57QcTNhG6hux68ex/TrPRU8Sk5CGxaWYud+BDnWtd2QqaCIGoyKswJBeXTEnQTP3dcPRZuTs0rerAEblwCiFS1F39GiSSVpcqO3JA4FA0NuPI+9Bd6QDuw6rrKIAZppEClcIT5zbFQbZem5R1LFifLN/15bpyYmo374bvx+VH2NQwYuo0LHg9ya4FcPvMRAg2OZJu+zAhGOEU+NuwfI0QH5YwEWcnxOI7g6Q0FWYFVsWnMxgEVJIBomPbL3DMuo0dscOOQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM3PR12MB0860; X-Microsoft-Exchange-Diagnostics: 1; DM3PR12MB0860; 20:Zi0MkYotnFpOg0fz4tJXv3N78vWedPbhNZaPxsa9QWayTwrPlKTj/vtR22FknFjb5tFMoMPa2BOeqxZyw9czwMzN1ISX6RTyRWLd5pBavOq8peS0NfyRLZVX8LlPDFl8gk7lBN9ghEfsvzWtHjA9DOSfIi0oR3UzQOQj44gh2ATmkinvRfcfJ5gaq77iiIshxU8zzt9LINKFL2gyps0f55SByw4qsMApW/uAoJE4IfBOG75kqSwrWEwx7kB8L4bh0ns/rh9sfvedNhA73nFQ36WaCs6ZL9CTM16v8gxxV3ENqvuEP1610allla9WvwGi0ml0uPutJwTCSAwpoHu62VpRMjk4YVlROw2iRCKl+Fs/C+WjyivF93ZGbmRSX4g4V6pp4v+GfoUJWV5FsMPZaDz4pKeWIUtD8Anz6MquQdjgwFO/VARx/Fj87cIeq04aa7Ct3he9IVzf0p5qFTnSTBSNnz8RWaPUiUdYdPwVzyh+3wkDW0GqT0FeZ92BKviJ; 4:bVLvnwm/y1VnaXv5IzOEBhsB7ldpRJJNMHUCATQvy0jCf9HLrk83G3nWZiNDzIvxpdQj2ylu2V8l2LKkj8z/+kf1NEzgE5V5oB20sbggF7ubrAl+v3TDq3kE+uYv5s/3GlQE72wm9BT6rBqdx7TVxTt/Ys+uMrsIH5prvzKwZaZrLtNkPTic2+j1CuqWV0g/VaABfwqsF6xZHZwUtq7qS/SKWdcncs1SxI2ipU3MXyUfzfk/N39iWHLl2Gdd1yOyRmWwoM17lgWVXG1SiGfXxDT/JzezHmMqcqm4P/PVtSIXxuRrGz8ChKMqpNaDpJOyqIwa/Ag7bEz6uQZnrudOaoKWi7rkrUY+jh/bGRCkQ3sgWYz5apVMTKQIP0CqaMuF 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)(8121501046)(5005006)(3002001)(102115026); SRVR:DM3PR12MB0860; BCL:0; PCL:0; RULEID:; SRVR:DM3PR12MB0860; X-Forefront-PRVS: 073631BD3D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM3PR12MB0860; 23:4q0MPmjZtLKwWISROImL6bttt4s2BUGbJTTJg483b?= =?us-ascii?Q?7AI0rLyFCU8EdmU8V719kqxav3hcNHLBwSGxi1s0Vd9amkKPXN8JJ9Y2bpCS?= =?us-ascii?Q?R+zxos2+Sxys9LNOm8usIQmy2JTcqgT0+j1ScLRgWqD4kR6il7MsOmnG5eG9?= =?us-ascii?Q?Q+yjJz0mc1loAlPworNGXB8g6b+5UCPoc42S7p8yGU1Baudto4wBDAD5NOlg?= =?us-ascii?Q?ce32ZRqXo0MBnRlRIUGoYKmbTSl/7h9cDT44RMwcsno7aPtNZ7TnEwCRJXdd?= =?us-ascii?Q?QbnoUl4eNyffBUmSiIIwNx9C6M6+8ebOFoakBWuSoIC1AfPnqdlC/zPTQ4sU?= =?us-ascii?Q?tbqV4ea3CEOMlb2murY74LL30bHWDw4rkr1mI+/Q8t5mMvwoTs7KpdlTVEBa?= =?us-ascii?Q?0yIw3iVEGmbkdtSe74KHjlaXtHegNCX5FO2+cZLS0aG0ZOET310WvsaPI+V7?= =?us-ascii?Q?RRLvJPOpCyxJeXpIxB1mBaSFMKutJcO9FU0SaeW8Ir7s8zAUcvDrtnndwUQf?= =?us-ascii?Q?3r6uya216qKKM2f09YcPkzDrgKg3QTB+tDFLxPqnaNpPD++Cc8cXN90+qDED?= =?us-ascii?Q?7RYe3bebXzwIYGMF7yNrUVEfcpZqwh94x6b/LAJOZALaPW0qJiGIdUwVete/?= =?us-ascii?Q?CXv+H2mLvlvdOg7yJX3S5sNnvrr884l3az2e81FXjeLMbVujyE/yi1VsHVgO?= =?us-ascii?Q?KbBx6RZ/jZpDSGRTADW7MX8D+03ohc7A6pQcSQNaIS61neErX79ryBt4XWIz?= =?us-ascii?Q?7XEQ/MwzgJkTDyqnlYKC483cTzRaCLuVUFs1Bw9K8bmhHfmfB0Z9kMou8SGe?= =?us-ascii?Q?GDOMw86ResP/jsiXasr7G7fUAXR3uplACCh3EXfh57jn82CLbUHjUIXXkDU+?= =?us-ascii?Q?/168w3JSxbXkvmMyNud/WlPGTRaX6s2/e29eF9qhGixQqkXnfW3SytKXVYh2?= =?us-ascii?Q?r6Q3FV0hbHTTWN4mbI/eIOO+LkFWggQdonbFqsxOCO3AUEmcwBXB+AqdAhSB?= =?us-ascii?Q?4g=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM3PR12MB0860; 5:SgJ+JB3NOHJxJrPIOt+IzNS/S258b+5d4A8RDVOy9x5PhlY1sKp1WuW1J1xl3dR04hLwQ6sH0LPixYQck1Eompa+0cDFyvtbpLn8PJ6SHLxy7fmwdSqCE/h6uFvpah5KiLxYcVvZw6SML9DAETP/+Q==; 24:sq3RYSaxRFf7tex5cXgNMxM0D0iIt9jxn7kukGwoUPGQ+GkjU89d+JgbJc4CtRZCYVmdWilKoWIlsn7+OpSYcLYB/vQZ7HW/4X4RWX5AWHQ=; 20:j9kV7ZIz5DfYIZPZR8E7b3EXfDlewJQ7A0tFUZxDMLtPjEVpqwZEk7iLh9MqCYZoJx0A/OFAjxRpvyTYiYN2E21iKxbs2XyWNPqMxnv4NkCOrQHU2Hq2MmvPg9sjNqFsXAgGsQ1MmiNm+N568BiLOtbTyn//ryWqN/8TZ3v9ETVpl/wZAwSdmCjwsgwFcBoOF+h6kLf78eU2xW2xwDR7hZFrTDE5nP0qLIxZwdl+agdGVhsWhOAJI2r9Zhlau139 SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2015 18:50:20.9335 (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: DM3PR12MB0860 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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