[PATCH 1/2] soundwire: qcom: Take controller IRQ trigger type from DT
From: Birk Skyum via B4 Relay
Date: Tue Dec 01 2026 - 11:28:38 EST
From: Birk Skyum <birk.skyum@xxxxx>
The controller interrupt is requested with IRQF_TRIGGER_RISING even
though every Qualcomm device tree declares it IRQ_TYPE_LEVEL_HIGH. That
request changes the IRQ mapping's trigger type to edge, and it stays
that way after the driver unbinds. The next probe asks for the device
tree's level type, irq_create_fwspec_mapping() refuses with "type
mismatch", of_irq_get() returns 0, and probe fails with -EINVAL,
leaving the sound card gone until reboot.
On a Lenovo Yoga Slim 7x (X1E80100), this triggers whenever the audio
DSP driver reloads (for example after crash recovery or resuming from
hibernation), which unbinds and rebinds the LPASS SoundWire controllers.
Drop the hardcoded IRQF_TRIGGER_RISING flag so the trigger type comes
from firmware.
Fixes: 02efb49aa805 ("soundwire: qcom: add support for SoundWire controller")
Signed-off-by: Birk Skyum <birk.skyum@xxxxx>
---
drivers/soundwire/qcom.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index 6e0c5fb10..6dde94e42 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -1713,9 +1713,13 @@ static int qcom_swrm_probe(struct platform_device *pdev)
ctrl->reg_read(ctrl, SWRM_COMP_HW_VERSION, &ctrl->version);
qcom_swrm_set_ee_register_layout(ctrl, data);
+ /*
+ * Take the trigger type from the device tree. Forcing a rising edge
+ * changes the mapping of a level interrupt, and the next probe after
+ * an unbind then fails to map it ("type mismatch") and gets IRQ 0.
+ */
ret = devm_request_threaded_irq(dev, ctrl->irq, NULL,
qcom_swrm_irq_handler,
- IRQF_TRIGGER_RISING |
IRQF_ONESHOT,
"soundwire", ctrl);
if (ret) {
--
2.56.0