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: 7459531 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 84ECABEEA4 for ; Wed, 21 Oct 2015 18:52:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B82BB2089C for ; Wed, 21 Oct 2015 18:52:29 +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 CB8C220852 for ; Wed, 21 Oct 2015 18:52:28 +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 1ZoyTK-0006uS-AL; Wed, 21 Oct 2015 18:50:50 +0000 Received: from mail-by2on0061.outbound.protection.outlook.com ([207.46.100.61] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZoyTE-0006U3-52 for linux-arm-kernel@lists.infradead.org; Wed, 21 Oct 2015 18:50:47 +0000 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: , , , 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151021_115044_429250_E34A6CE9 X-CRM114-Status: GOOD ( 11.50 ) 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, 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