From: Ilia Snezhkov via B4 Relay <devnull+iasnezhkov.gmail.com@kernel.org>
To: broonie@kernel.org, lgirdwood@gmail.com
Cc: perex@perex.cz, tiwai@suse.com, matthias.bgg@gmail.com,
angelogioacchino.delregno@collabora.com,
linux-sound@vger.kernel.org, linux-mediatek@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: mediatek: mtk-btcvsd: use the interrupt trigger type from DT
Date: Thu, 26 Nov 2026 00:07:13 +0000 [thread overview]
Message-ID: <20261126000713.16278-1-iasnezhkov@gmail.com> (raw)
From: Ilia Snezhkov <iasnezhkov@gmail.com>
The driver requests its interrupt with IRQF_TRIGGER_LOW, which
overrides the trigger type given in the device tree. That only works
where a polarity inverter such as mediatek,mt6577-sysirq sits between
the BT-SCO interrupt and the GIC. On SoCs that route it straight to a
GICv3 SPI as level-high, MT6789 for example, gic_set_type() rejects a
level-low SPI, request_irq() fails with -EINVAL and the driver does not
probe.
Pass no trigger flags so that the type configured from the
"interrupts" property is used. The binding example keeps
IRQ_TYPE_LEVEL_LOW, which is still what such a node gets, and no
in-tree device tree uses this compatible yet. MediaTek's downstream
version of this driver requests the interrupt with IRQF_TRIGGER_NONE
and describes it as IRQ_TYPE_LEVEL_HIGH in its MT6789, MT6833, MT6853,
MT6855, MT6873 and MT6879 device trees.
Found and drafted with an AI coding assistant while bringing up MT6789.
Signed-off-by: Ilia Snezhkov <iasnezhkov@gmail.com>
---
Notes:
The same change is in the MediaTek-derived copy of this driver that runs on
an MT6789 phone (GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH): it probes and is in use
(logs of the 6.18 build). This exact mainline change was not built or run.
No Fixes tag because no in-tree device tree is affected; a tag pointing at
4bd8597dc36c (the commit that added the driver) can be added if preferred.
sound/soc/mediatek/common/mtk-btcvsd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/mediatek/common/mtk-btcvsd.c b/sound/soc/mediatek/common/mtk-btcvsd.c
index 19329dd..4448d99 100644
--- a/sound/soc/mediatek/common/mtk-btcvsd.c
+++ b/sound/soc/mediatek/common/mtk-btcvsd.c
@@ -1298,8 +1298,7 @@ static int mtk_btcvsd_snd_probe(struct platform_device *pdev)
return irq_id < 0 ? irq_id : -ENXIO;
ret = devm_request_irq(dev, irq_id, mtk_btcvsd_snd_irq_handler,
- IRQF_TRIGGER_LOW, "BTCVSD_ISR_Handle",
- (void *)btcvsd);
+ 0, "BTCVSD_ISR_Handle", (void *)btcvsd);
if (ret) {
dev_err(dev, "could not request_irq for BTCVSD_ISR_Handle\n");
return ret;
--
2.54.0 (Apple Git-157)
reply other threads:[~2026-11-26 0:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261126000713.16278-1-iasnezhkov@gmail.com \
--to=devnull+iasnezhkov.gmail.com@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=iasnezhkov@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®