From nobody Wed Jul 1 13:29:18 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E765FC433FE for ; Tue, 21 Dec 2021 17:01:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240112AbhLURBS (ORCPT ); Tue, 21 Dec 2021 12:01:18 -0500 Received: from relmlor1.renesas.com ([210.160.252.171]:55547 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240118AbhLURBL (ORCPT ); Tue, 21 Dec 2021 12:01:11 -0500 X-IronPort-AV: E=Sophos;i="5.88,224,1635174000"; d="scan'208";a="104253504" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 Dec 2021 02:01:11 +0900 Received: from localhost.localdomain (unknown [10.226.36.204]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id E143F4004BAE; Wed, 22 Dec 2021 02:01:08 +0900 (JST) From: Lad Prabhakar To: Rob Herring , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, Michal Simek , alsa-devel@alsa-project.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lad Prabhakar Subject: [PATCH v2 1/2] ASoC: xlnx: Use platform_get_irq() to get the interrupt Date: Tue, 21 Dec 2021 17:00:59 +0000 Message-Id: <20211221170100.27423-2-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211221170100.27423-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20211221170100.27423-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static allocation of IRQ resources in DT core code, this causes an issue when using hierarchical interrupt domains using "interrupts" property in the node as this bypasses the hierarchical setup and messes up the irq chaining. In preparation for removal of static setup of IRQ resource from DT core code use platform_get_irq(). Signed-off-by: Lad Prabhakar --- v1->v2 * No change --- sound/soc/xilinx/xlnx_spdif.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sound/soc/xilinx/xlnx_spdif.c b/sound/soc/xilinx/xlnx_spdif.c index e2ca087adee6..cba0e868a7d7 100644 --- a/sound/soc/xilinx/xlnx_spdif.c +++ b/sound/soc/xilinx/xlnx_spdif.c @@ -237,7 +237,6 @@ MODULE_DEVICE_TABLE(of, xlnx_spdif_of_match); static int xlnx_spdif_probe(struct platform_device *pdev) { int ret; - struct resource *res; struct snd_soc_dai_driver *dai_drv; struct spdif_dev_data *ctx; =20 @@ -273,13 +272,10 @@ static int xlnx_spdif_probe(struct platform_device *p= dev) if (ctx->mode) { dai_drv =3D &xlnx_spdif_tx_dai; } else { - res =3D platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!res) { - dev_err(dev, "No IRQ resource found\n"); - ret =3D -ENODEV; + ret =3D platform_get_irq(pdev, 0); + if (ret < 0) goto clk_err; - } - ret =3D devm_request_irq(dev, res->start, + ret =3D devm_request_irq(dev, ret, xlnx_spdifrx_irq_handler, 0, "XLNX_SPDIF_RX", ctx); if (ret) { --=20 2.17.1 From nobody Wed Jul 1 13:29:18 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6D82C433EF for ; Tue, 21 Dec 2021 17:01:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240158AbhLURBW (ORCPT ); Tue, 21 Dec 2021 12:01:22 -0500 Received: from relmlor1.renesas.com ([210.160.252.171]:1977 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240103AbhLURBO (ORCPT ); Tue, 21 Dec 2021 12:01:14 -0500 X-IronPort-AV: E=Sophos;i="5.88,224,1635174000"; d="scan'208";a="104253507" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 22 Dec 2021 02:01:14 +0900 Received: from localhost.localdomain (unknown [10.226.36.204]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id AA4B540083DD; Wed, 22 Dec 2021 02:01:11 +0900 (JST) From: Lad Prabhakar To: Rob Herring , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, Michal Simek , alsa-devel@alsa-project.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lad Prabhakar Subject: [PATCH v2 2/2] ASoC: bcm: Use platform_get_irq() to get the interrupt Date: Tue, 21 Dec 2021 17:01:00 +0000 Message-Id: <20211221170100.27423-3-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211221170100.27423-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20211221170100.27423-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static allocation of IRQ resources in DT core code, this causes an issue when using hierarchical interrupt domains using "interrupts" property in the node as this bypasses the hierarchical setup and messes up the irq chaining. In preparation for removal of static setup of IRQ resource from DT core code use platform_get_irq(). While at it also drop "r_irq" member from struct bcm_i2s_priv as there are no users of it. Signed-off-by: Lad Prabhakar Reviewed-by: Florian Fainelli --- v1->v2 * Included RB tag from Florian * Included irq.h to fix builds for x86 --- sound/soc/bcm/bcm63xx-i2s.h | 1 - sound/soc/bcm/bcm63xx-pcm-whistler.c | 13 ++++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/sound/soc/bcm/bcm63xx-i2s.h b/sound/soc/bcm/bcm63xx-i2s.h index edc328ba53d3..f30556bec89e 100644 --- a/sound/soc/bcm/bcm63xx-i2s.h +++ b/sound/soc/bcm/bcm63xx-i2s.h @@ -74,7 +74,6 @@ =20 struct bcm_i2s_priv { struct device *dev; - struct resource *r_irq; struct regmap *regmap_i2s; struct clk *i2s_clk; struct snd_pcm_substream *play_substream; diff --git a/sound/soc/bcm/bcm63xx-pcm-whistler.c b/sound/soc/bcm/bcm63xx-p= cm-whistler.c index b5096f64c576..2c600b017524 100644 --- a/sound/soc/bcm/bcm63xx-pcm-whistler.c +++ b/sound/soc/bcm/bcm63xx-pcm-whistler.c @@ -6,6 +6,7 @@ =20 #include #include +#include #include #include #include @@ -387,14 +388,12 @@ int bcm63xx_soc_platform_probe(struct platform_device= *pdev, { int ret; =20 - i2s_priv->r_irq =3D platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!i2s_priv->r_irq) { - dev_err(&pdev->dev, "Unable to get register irq resource.\n"); - return -ENODEV; - } + ret =3D platform_get_irq(pdev, 0); + if (ret < 0) + return ret; =20 - ret =3D devm_request_irq(&pdev->dev, i2s_priv->r_irq->start, i2s_dma_isr, - i2s_priv->r_irq->flags, "i2s_dma", (void *)i2s_priv); + ret =3D devm_request_irq(&pdev->dev, ret, i2s_dma_isr, + irq_get_trigger_type(ret), "i2s_dma", (void *)i2s_priv); if (ret) { dev_err(&pdev->dev, "i2s_init: failed to request interrupt.ret=3D%d\n", ret); --=20 2.17.1