Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: SDCA: Add FDL-specific IRQ processing

Hookup the XU IRQs required for the FDL process.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20251020155512.353774-16-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Maciej Strozek and committed by
Mark Brown
aeaf27ec 71f7990a

+34
+34
sound/soc/sdca/sdca_interrupts.c
··· 18 18 #include <linux/soundwire/sdw.h> 19 19 #include <linux/soundwire/sdw_registers.h> 20 20 #include <sound/sdca.h> 21 + #include <sound/sdca_fdl.h> 21 22 #include <sound/sdca_function.h> 22 23 #include <sound/sdca_interrupts.h> 24 + #include <sound/sdca_ump.h> 23 25 #include <sound/soc-component.h> 24 26 #include <sound/soc.h> 25 27 ··· 247 245 return irqret; 248 246 } 249 247 248 + static irqreturn_t fdl_owner_handler(int irq, void *data) 249 + { 250 + struct sdca_interrupt *interrupt = data; 251 + struct device *dev = interrupt->dev; 252 + irqreturn_t irqret = IRQ_NONE; 253 + int ret; 254 + 255 + ret = pm_runtime_get_sync(dev); 256 + if (ret < 0) { 257 + dev_err(dev, "failed to resume for fdl: %d\n", ret); 258 + goto error; 259 + } 260 + 261 + ret = sdca_fdl_process(interrupt); 262 + if (ret) 263 + goto error; 264 + 265 + irqret = IRQ_HANDLED; 266 + error: 267 + pm_runtime_put(dev); 268 + return irqret; 269 + } 270 + 250 271 static int sdca_irq_request_locked(struct device *dev, 251 272 struct sdca_interrupt_info *info, 252 273 int sdca_irq, const char *name, ··· 447 422 case SDCA_ENTITY_TYPE_GE: 448 423 if (control->sel == SDCA_CTL_GE_DETECTED_MODE) 449 424 handler = detected_mode_handler; 425 + break; 426 + case SDCA_ENTITY_TYPE_XU: 427 + if (control->sel == SDCA_CTL_XU_FDL_CURRENTOWNER) { 428 + ret = sdca_fdl_alloc_state(interrupt); 429 + if (ret) 430 + return ret; 431 + 432 + handler = fdl_owner_handler; 433 + } 450 434 break; 451 435 default: 452 436 break;