mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 14:42:08 +02:00
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>
This commit is contained in:
parent
71f7990a34
commit
aeaf27ec65
|
|
@ -18,8 +18,10 @@
|
|||
#include <linux/soundwire/sdw.h>
|
||||
#include <linux/soundwire/sdw_registers.h>
|
||||
#include <sound/sdca.h>
|
||||
#include <sound/sdca_fdl.h>
|
||||
#include <sound/sdca_function.h>
|
||||
#include <sound/sdca_interrupts.h>
|
||||
#include <sound/sdca_ump.h>
|
||||
#include <sound/soc-component.h>
|
||||
#include <sound/soc.h>
|
||||
|
||||
|
|
@ -245,6 +247,29 @@ static irqreturn_t detected_mode_handler(int irq, void *data)
|
|||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user