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: 314229 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: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: 314228 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: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: 314227 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;