From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basealt.ru; s=dkim; t=1772188377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Y7X34FkNuO2H/aYSFLlBWsvxvSJUThkojgySxfiIbCA=; b=v/5xD/Zd8/FqIylZY2c6cJk6Z5EKzwQr0NP9/QLfkhrGqybgVP1frEOmaJmKXCQh89GH8c UKqtdcKS9jddcTbLl1RuKberlgrrL9jCkeCS7oQcpjTc/FrOG1XhNR4R3X0MiPZxOP8Vv3 BlHlukup+WWBBLi3MBawGbt/ik1sGqU/x0t1ozpV/CJ1L4SFrqg5Bs346TKTcjH+W4YJ2w 2Q6y63A5aTaHv4q4pbMmmJPZcDMNWAZc0ohxdAIlYr5Sx2Jeb9KtB8HdKjwxfr3OviPHd8 0XVy7tVg4yPV5RZxNLnrmtmuyVaCf9StoaT0OldwBy6AHOqVBSm/ahih+6plsA== From: Daniil Gnusarev To: gnusarevda@basealt.ru, devel-kernel@lists.altlinux.org Date: Fri, 27 Feb 2026 14:32:19 +0400 Message-ID: <20260227103236.785736-19-gnusarevda@basealt.ru> X-Mailer: git-send-email 2.42.2 In-Reply-To: <20260227103236.785736-1-gnusarevda@basealt.ru> References: <20260227103236.785736-1-gnusarevda@basealt.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [d-kernel] [PATCH 18/35] sound: dwc-i2s: request all IRQs specified in device tree X-BeenThere: devel-kernel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux kernel packages development List-Id: ALT Linux kernel packages development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Feb 2026 10:33:18 -0000 Archived-At: List-Archive: List-Post: From: Alexey Sheplyakov Some SoCs need more than one IRQ to use the block properly. Therefore dw_i2s_probe should requests all IRQs specified in the device tree. Signed-off-by: Alexey Sheplyakov X-feature-Baikal-M --- sound/soc/dwc/dwc-i2s.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sound/soc/dwc/dwc-i2s.c b/sound/soc/dwc/dwc-i2s.c index 28001e9857d9dc..5d2e8c2f51c27f 100644 --- a/sound/soc/dwc/dwc-i2s.c +++ b/sound/soc/dwc/dwc-i2s.c @@ -919,7 +919,7 @@ static int dw_i2s_probe(struct platform_device *pdev) const struct i2s_platform_data *pdata = pdev->dev.platform_data; struct dw_i2s_dev *dev; struct resource *res; - int ret, irq; + int ret, irq, irq_count; struct snd_soc_dai_driver *dw_i2s_dai; const char *clk_id; @@ -957,10 +957,18 @@ static int dw_i2s_probe(struct platform_device *pdev) return ret; } - irq = platform_get_irq_optional(pdev, 0); - if (irq >= 0) { + irq_count = platform_irq_count(pdev); + if (irq_count < 0) /* - EPROBE_DEFER */ + return irq_count; + + for (unsigned i = 0; i < (unsigned)irq_count; i++) { + irq = platform_get_irq(pdev, i); + if (irq < 0) + return irq; + ret = devm_request_irq(&pdev->dev, irq, i2s_irq_handler, 0, pdev->name, dev); + if (ret < 0) { dev_err(&pdev->dev, "failed to request irq\n"); goto err_assert_reset; -- 2.42.2