[d-kernel] [PATCH 26/39] sound: dwc-i2s: request all IRQs specified in device tree
Daniil Gnusarev
gnusarevda на basealt.ru
Пн Окт 14 17:02:07 MSK 2024
From: Alexey Sheplyakov <asheplyakov на basealt.ru>
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 <asheplyakov на basealt.ru>
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 17b5fee698161..a9b9777ecb89e 100644
--- a/sound/soc/dwc/dwc-i2s.c
+++ b/sound/soc/dwc/dwc-i2s.c
@@ -925,7 +925,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;
@@ -963,10 +963,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
Подробная информация о списке рассылки devel-kernel