]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: SDCA: Add flag for unused IRQs
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Tue, 24 Jun 2025 12:28:42 +0000 (13:28 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 30 Jun 2025 15:04:16 +0000 (16:04 +0100)
Zero is a valid SDCA IRQ interrupt position so add a special value to
indicate that the IRQ is not used.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.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/20250624122844.2761627-6-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/sdca_function.h
sound/soc/sdca/sdca_functions.c

index 4b278513597e554c670bf7e3afb0fdcf260f7373..b4a97ff087294bfd54ae06bfbf2fbc975c99c1ac 100644 (file)
@@ -17,6 +17,8 @@ struct device;
 struct sdca_entity;
 struct sdca_function_desc;
 
+#define SDCA_NO_INTERRUPT -1
+
 /*
  * The addressing space for SDCA relies on 7 bits for Entities, so a
  * maximum of 128 Entities per function can be represented.
index 093c681e93879ed1b40d6daa3e919daa4bbbd2e7..c34f3bf6298336ef632f75ce96d75714d70dfe87 100644 (file)
@@ -912,6 +912,8 @@ static int find_sdca_entity_control(struct device *dev, struct sdca_entity *enti
                                       &tmp);
        if (!ret)
                control->interrupt_position = tmp;
+       else
+               control->interrupt_position = SDCA_NO_INTERRUPT;
 
        control->label = find_sdca_control_label(dev, entity, control);
        if (!control->label)