From patchwork Fri Oct 30 16:59:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 11870349 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4ED60C55178 for ; Fri, 30 Oct 2020 17:00:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F370E2076E for ; Fri, 30 Oct 2020 17:00:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727068AbgJ3RAA (ORCPT ); Fri, 30 Oct 2020 13:00:00 -0400 Received: from mga17.intel.com ([192.55.52.151]:47265 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726461AbgJ3Q77 (ORCPT ); Fri, 30 Oct 2020 12:59:59 -0400 IronPort-SDR: WeBQan7gvinR4B1oRYgl+tWlht+RmMuzCNQBd7d4Pu62wUJqne5vecRJRDzQDXIaIjwVz1j/8j VImFaCqI5EMg== X-IronPort-AV: E=McAfee;i="6000,8403,9790"; a="148490949" X-IronPort-AV: E=Sophos;i="5.77,434,1596524400"; d="scan'208";a="148490949" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2020 09:59:23 -0700 IronPort-SDR: Mt8T6SlCqGZXvVHCijMrKN/JsrduqCTTegxIp/PLEH9pXxrdvv49gx2fd+iDuz+1vkjug4cBYV e5tt7ZQgfb0A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,434,1596524400"; d="scan'208";a="537126455" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 30 Oct 2020 09:59:21 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id A6BCD4E1; Fri, 30 Oct 2020 18:59:20 +0200 (EET) From: Andy Shevchenko To: Mark Brown , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-acpi@vger.kernel.org, Marc Zyngier , Thomas Gleixner Cc: Andy Shevchenko Subject: [PATCH v2 1/5] irqdomain: Remove unused of_device_id forward declaration Date: Fri, 30 Oct 2020 18:59:15 +0200 Message-Id: <20201030165919.86234-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201030165919.86234-1-andriy.shevchenko@linux.intel.com> References: <20201030165919.86234-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org There is no users of of_device_id in irqdomain.h. Drop it. Signed-off-by: Andy Shevchenko --- include/linux/irqdomain.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 71535e87109f..56642188ec21 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -38,7 +38,6 @@ struct device_node; struct irq_domain; -struct of_device_id; struct irq_chip; struct irq_data; struct cpumask; From patchwork Fri Oct 30 16:59:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 11870343 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F08D8C00A89 for ; Fri, 30 Oct 2020 17:00:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A648E20791 for ; Fri, 30 Oct 2020 17:00:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726991AbgJ3Q77 (ORCPT ); Fri, 30 Oct 2020 12:59:59 -0400 Received: from mga06.intel.com ([134.134.136.31]:54480 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726095AbgJ3Q77 (ORCPT ); Fri, 30 Oct 2020 12:59:59 -0400 IronPort-SDR: joe+/qAag6vQ7Nn+D7Zk7oEXjxbdsi0XE2ER3Ugc6cLVqQmmilaSV0n7oAD6CnqAggYwsl3viC UqWBFqh4qOKg== X-IronPort-AV: E=McAfee;i="6000,8403,9790"; a="230271386" X-IronPort-AV: E=Sophos;i="5.77,434,1596524400"; d="scan'208";a="230271386" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2020 09:59:23 -0700 IronPort-SDR: 29LgB243tCKX0jFUo7aH/0GANad3+YOiJzCXs44sBOzkj9QW05F0MkMQnsXKfO4AwLPzvn8SEm mopvz51qcBvA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,434,1596524400"; d="scan'208";a="304814928" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga008.fm.intel.com with ESMTP; 30 Oct 2020 09:59:21 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id ADB845F2; Fri, 30 Oct 2020 18:59:20 +0200 (EET) From: Andy Shevchenko To: Mark Brown , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-acpi@vger.kernel.org, Marc Zyngier , Thomas Gleixner Cc: Andy Shevchenko Subject: [PATCH v2 2/5] irqdomain: Add forward declaration of fwnode_handle Date: Fri, 30 Oct 2020 18:59:16 +0200 Message-Id: <20201030165919.86234-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201030165919.86234-1-andriy.shevchenko@linux.intel.com> References: <20201030165919.86234-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org irqdomain.h is a user of struct fwnode_handle. Add forward declaration of it. Signed-off-by: Andy Shevchenko --- include/linux/irqdomain.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 56642188ec21..d21f75d294d7 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -37,6 +37,7 @@ #include struct device_node; +struct fwnode_handle; struct irq_domain; struct irq_chip; struct irq_data; From patchwork Fri Oct 30 16:59:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 11870345 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05B27C4741F for ; Fri, 30 Oct 2020 17:00:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A07102076E for ; Fri, 30 Oct 2020 17:00:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727136AbgJ3RAA (ORCPT ); Fri, 30 Oct 2020 13:00:00 -0400 Received: from mga06.intel.com ([134.134.136.31]:54480 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726482AbgJ3Q77 (ORCPT ); Fri, 30 Oct 2020 12:59:59 -0400 IronPort-SDR: D+FHN8s4HrRdmg2JbN6/5zMbezWORVFa4RlDQsxibKM/QwuKqN1LJ+aG8zDCvDPl5orrupMUA8 du6HML2TA6cg== X-IronPort-AV: E=McAfee;i="6000,8403,9790"; a="230271388" X-IronPort-AV: E=Sophos;i="5.77,434,1596524400"; d="scan'208";a="230271388" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2020 09:59:23 -0700 IronPort-SDR: YNyQ8NFHqXxZYtLcfXDKjID5L9YASzfYrXHyikEdrFgK23FQVT6DHc6Fpmz/n6sQuOus7tOsp1 fg9pcfPuoFVA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,434,1596524400"; d="scan'208";a="319377478" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 30 Oct 2020 09:59:21 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id B85E0638; Fri, 30 Oct 2020 18:59:20 +0200 (EET) From: Andy Shevchenko To: Mark Brown , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-acpi@vger.kernel.org, Marc Zyngier , Thomas Gleixner Cc: Andy Shevchenko Subject: [PATCH v2 3/5] irqdomain: Replace open coded of_node_to_fwnode() Date: Fri, 30 Oct 2020 18:59:17 +0200 Message-Id: <20201030165919.86234-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201030165919.86234-1-andriy.shevchenko@linux.intel.com> References: <20201030165919.86234-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org We can convert device node to fwnode with of_node_to_fwnode(). Replace open coded variant of it in of_phandle_args_to_fwspec(). Signed-off-by: Andy Shevchenko --- kernel/irq/irqdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index cf8b374b892d..831526f2e728 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -737,7 +737,7 @@ static void of_phandle_args_to_fwspec(struct device_node *np, const u32 *args, { int i; - fwspec->fwnode = np ? &np->fwnode : NULL; + fwspec->fwnode = of_node_to_fwnode(np); fwspec->param_count = count; for (i = 0; i < count; i++) From patchwork Fri Oct 30 16:59:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 11870347 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3F6FC00A89 for ; Fri, 30 Oct 2020 17:00:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 840272076E for ; Fri, 30 Oct 2020 17:00:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726384AbgJ3RAS (ORCPT ); Fri, 30 Oct 2020 13:00:18 -0400 Received: from mga09.intel.com ([134.134.136.24]:64519 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726272AbgJ3Q77 (ORCPT ); Fri, 30 Oct 2020 12:59:59 -0400 IronPort-SDR: rvCT8+dqFrxw0K99YX1ZScrWQl037PM7Uo4oMrM+z8x/Exlmv3vYplAKKvDERT+3gwHX4TX+YF Aakr/sMVlDLQ== X-IronPort-AV: E=McAfee;i="6000,8403,9790"; a="168765504" X-IronPort-AV: E=Sophos;i="5.77,434,1596524400"; d="scan'208";a="168765504" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2020 09:59:23 -0700 IronPort-SDR: MQEgJw3eSNmulxDAetPI2V2g5YOCfJ5wHujxZTrF4I0DDvHQd6wVstIEo3aynr/CKrOQvN7C18 SXrwz1n+XuKg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,434,1596524400"; d="scan'208";a="304988662" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga007.fm.intel.com with ESMTP; 30 Oct 2020 09:59:21 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id C11DC726; Fri, 30 Oct 2020 18:59:20 +0200 (EET) From: Andy Shevchenko To: Mark Brown , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-acpi@vger.kernel.org, Marc Zyngier , Thomas Gleixner Cc: Andy Shevchenko Subject: [PATCH v2 4/5] irqdomain: Introduce irq_domain_create_legacy() API Date: Fri, 30 Oct 2020 18:59:18 +0200 Message-Id: <20201030165919.86234-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201030165919.86234-1-andriy.shevchenko@linux.intel.com> References: <20201030165919.86234-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Introduce irq_domain_create_legacy() API which is functional equivalent to the existing irq_domain_add_legacy(), but takes a pointer to the struct fwnode_handle as a parameter. Some users want to use it in non-OF cases. Signed-off-by: Andy Shevchenko --- Documentation/core-api/irq/irq-domain.rst | 6 ++++++ include/linux/irqdomain.h | 6 ++++++ kernel/irq/irqdomain.c | 17 ++++++++++++++--- 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/Documentation/core-api/irq/irq-domain.rst b/Documentation/core-api/irq/irq-domain.rst index 096db12f32d5..a77c24c27f7b 100644 --- a/Documentation/core-api/irq/irq-domain.rst +++ b/Documentation/core-api/irq/irq-domain.rst @@ -147,6 +147,7 @@ Legacy irq_domain_add_simple() irq_domain_add_legacy() irq_domain_add_legacy_isa() + irq_domain_create_legacy() The Legacy mapping is a special case for drivers that already have a range of irq_descs allocated for the hwirqs. It is used when the @@ -185,6 +186,11 @@ that the driver using the simple domain call irq_create_mapping() before any irq_find_mapping() since the latter will actually work for the static IRQ assignment case. +irq_domain_add_legacy() and irq_domain_create_legacy() are functionally +equivalent, except for the first argument is different - the former +accepts an Open Firmware specific 'struct device_node', while the latter +accepts a more general abstraction 'struct fwnode_handle'. + Hierarchy IRQ domain -------------------- diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index d21f75d294d7..77bf7d84c673 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -271,6 +271,12 @@ struct irq_domain *irq_domain_add_legacy(struct device_node *of_node, irq_hw_number_t first_hwirq, const struct irq_domain_ops *ops, void *host_data); +struct irq_domain *irq_domain_create_legacy(struct fwnode_handle *fwnode, + unsigned int size, + unsigned int first_irq, + irq_hw_number_t first_hwirq, + const struct irq_domain_ops *ops, + void *host_data); extern struct irq_domain *irq_find_matching_fwspec(struct irq_fwspec *fwspec, enum irq_domain_bus_token bus_token); extern bool irq_domain_check_msi_remap(void); diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 831526f2e728..9c9cb8829f7a 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -350,17 +350,28 @@ struct irq_domain *irq_domain_add_legacy(struct device_node *of_node, irq_hw_number_t first_hwirq, const struct irq_domain_ops *ops, void *host_data) +{ + return irq_domain_create_legacy(of_node_to_fwnode(of_node), size, + first_irq, first_hwirq, ops, host_data); +} +EXPORT_SYMBOL_GPL(irq_domain_add_legacy); + +struct irq_domain *irq_domain_create_legacy(struct fwnode_handle *fwnode, + unsigned int size, + unsigned int first_irq, + irq_hw_number_t first_hwirq, + const struct irq_domain_ops *ops, + void *host_data) { struct irq_domain *domain; - domain = __irq_domain_add(of_node_to_fwnode(of_node), first_hwirq + size, - first_hwirq + size, 0, ops, host_data); + domain = __irq_domain_add(fwnode, first_hwirq + size, first_hwirq + size, 0, ops, host_data); if (domain) irq_domain_associate_many(domain, first_irq, first_hwirq, size); return domain; } -EXPORT_SYMBOL_GPL(irq_domain_add_legacy); +EXPORT_SYMBOL_GPL(irq_domain_create_legacy); /** * irq_find_matching_fwspec() - Locates a domain for a given fwspec From patchwork Fri Oct 30 16:59:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 11870351 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D38AC55178 for ; Fri, 30 Oct 2020 17:00:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1F0DE20791 for ; Fri, 30 Oct 2020 17:00:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727220AbgJ3RAO (ORCPT ); Fri, 30 Oct 2020 13:00:14 -0400 Received: from mga18.intel.com ([134.134.136.126]:23301 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726384AbgJ3Q77 (ORCPT ); Fri, 30 Oct 2020 12:59:59 -0400 IronPort-SDR: 9okJ5D8e68fPce6YVZpJNOVkzZbTXdlLD3iA6e6Ff0Jj+uzNttNCINYHr4i874yKl0/1Yes4He V8RVZNniqLGQ== X-IronPort-AV: E=McAfee;i="6000,8403,9790"; a="156409552" X-IronPort-AV: E=Sophos;i="5.77,434,1596524400"; d="scan'208";a="156409552" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2020 09:59:26 -0700 IronPort-SDR: d/J/nuxwkIfLocNU+z20Qnvu1v3oTx0L/VU2g/crrf7ikpwzlmAHCs/hNbuIUOQwLminprexI9 iqWlJd0tOcJA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,434,1596524400"; d="scan'208";a="351926030" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga004.fm.intel.com with ESMTP; 30 Oct 2020 09:59:24 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id CDFAC772; Fri, 30 Oct 2020 18:59:20 +0200 (EET) From: Andy Shevchenko To: Mark Brown , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-acpi@vger.kernel.org, Marc Zyngier , Thomas Gleixner Cc: Andy Shevchenko Subject: [PATCH v2 5/5] regmap: irq: Convert to use fwnode directly Date: Fri, 30 Oct 2020 18:59:19 +0200 Message-Id: <20201030165919.86234-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201030165919.86234-1-andriy.shevchenko@linux.intel.com> References: <20201030165919.86234-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Since IRQ domain provides an API to take fwnode as a parameter, switch regmap IRQ to use that directly instead of be limited to OF case only. Signed-off-by: Andy Shevchenko Acked-by: Mark Brown --- drivers/base/regmap/regmap-irq.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index ad5c2de395d1..19db764ffa4a 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -803,13 +803,12 @@ int regmap_add_irq_chip_fwnode(struct fwnode_handle *fwnode, } if (irq_base) - d->domain = irq_domain_add_legacy(to_of_node(fwnode), - chip->num_irqs, irq_base, - 0, ®map_domain_ops, d); + d->domain = irq_domain_create_legacy(fwnode, chip->num_irqs, + irq_base, 0, + ®map_domain_ops, d); else - d->domain = irq_domain_add_linear(to_of_node(fwnode), - chip->num_irqs, - ®map_domain_ops, d); + d->domain = irq_domain_create_linear(fwnode, chip->num_irqs, + ®map_domain_ops, d); if (!d->domain) { dev_err(map->dev, "Failed to create IRQ domain\n"); ret = -ENOMEM;