From: Maciej Strozek Date: Mon, 20 Oct 2025 15:55:08 +0000 (+0100) Subject: ASoC: SDCA: Add FDL-specific IRQ processing X-Git-Tag: v6.19-rc1~156^2~3^2~82^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aeaf27ec6571527e750eed84bb3865a0664ae316;p=thirdparty%2Fkernel%2Flinux.git ASoC: SDCA: Add FDL-specific IRQ processing Hookup the XU IRQs required for the FDL process. Reviewed-by: Bard Liao Signed-off-by: Maciej Strozek Signed-off-by: Charles Keepax Reviewed-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20251020155512.353774-16-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/sdca/sdca_interrupts.c b/sound/soc/sdca/sdca_interrupts.c index d0894c8e0552c..3a3b966b5782b 100644 --- a/sound/soc/sdca/sdca_interrupts.c +++ b/sound/soc/sdca/sdca_interrupts.c @@ -18,8 +18,10 @@ #include #include #include +#include #include #include +#include #include #include @@ -245,6 +247,29 @@ error: return irqret; } +static irqreturn_t fdl_owner_handler(int irq, void *data) +{ + struct sdca_interrupt *interrupt = data; + struct device *dev = interrupt->dev; + irqreturn_t irqret = IRQ_NONE; + int ret; + + ret = pm_runtime_get_sync(dev); + if (ret < 0) { + dev_err(dev, "failed to resume for fdl: %d\n", ret); + goto error; + } + + ret = sdca_fdl_process(interrupt); + if (ret) + goto error; + + irqret = IRQ_HANDLED; +error: + pm_runtime_put(dev); + return irqret; +} + static int sdca_irq_request_locked(struct device *dev, struct sdca_interrupt_info *info, int sdca_irq, const char *name, @@ -423,6 +448,15 @@ int sdca_irq_populate(struct sdca_function_data *function, if (control->sel == SDCA_CTL_GE_DETECTED_MODE) handler = detected_mode_handler; break; + case SDCA_ENTITY_TYPE_XU: + if (control->sel == SDCA_CTL_XU_FDL_CURRENTOWNER) { + ret = sdca_fdl_alloc_state(interrupt); + if (ret) + return ret; + + handler = fdl_owner_handler; + } + break; default: break; }