mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srini@kernel.org>
To: Vladyslav Tymoshchuk <tvlad744@gmail.com>,
	vkoul@kernel.org, srini@kernel.org
Cc: yung-chuan.liao@linux.intel.com, pierre-louis.bossart@linux.dev,
	linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soundwire: qcom: Take the interrupt trigger type from DT
Date: Tue, 1 Dec 2026 18:25:31 +0000	[thread overview]
Message-ID: <26a60f1e-1b58-4205-9fd4-76d2ec16ee15@kernel.org> (raw)
In-Reply-To: <20261129151323.1879-1-tvlad744@gmail.com>



On 11/29/26 3:13 PM, Vladyslav Tymoshchuk wrote:
> The driver requests its interrupt with IRQF_TRIGGER_RISING, while the DT
> nodes that give a type for it describe it as level high. The request
> switches the line to edge, and the mapping stays after the driver is
> unbound. The next probe then fails, as the type does not match the one
> from DT:
> 
>   irq: type mismatch, failed to map hwirq-187 for interrupt-controller@16000000!
>   qcom-soundwire 6ad0000.soundwire: Failed to request soundwire irq
>   qcom-soundwire 6ad0000.soundwire: probe with driver qcom-soundwire failed with error -22
> 
> Use the type from DT. Keep the rising edge for wcd9340, where the DT does
> not give a type.
> 
> Fixes: 02efb49aa805 ("soundwire: qcom: add support for SoundWire controller")
> Signed-off-by: Vladyslav Tymoshchuk <tvlad744@gmail.com>


Reviewed-by: Srinivas Kandagatla<srinivas.kandagatla@oss.qualcomm.com>

--Srini
> ---
> Tested on a OnePlus Pad 3 (SM8750; the board DT is not upstream yet),
> v7.3-rc5 plus board patches, unbind and bind of 6ad0000.soundwire:
> 
>   without the patch    2/2 fail to probe, no sound card until reboot
>   with the patch       3/3 bind, the sound card comes back
> 
> With the patch the interrupt is level and the counts do not rise at idle
> or during playback.
> 
> The kernel with the patch also had "soundwire: qcom: Disable runtime PM
> and avoid clock underflow in qcom_swrm_remove()" from Lee Jones' series
> and other patches for ADSP restart. Without Lee's patch the rebind ran
> into an oops in swrm_runtime_resume() (1/1). On next-20261127 I only
> built the patch. I could not test other SoCs.
> 
> I used an AI assistant (Claude) to find the problem and write the patch.
> 
>  drivers/soundwire/qcom.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
> index ad28a0fa345d..25c5f3b6d1ad 100644
> --- a/drivers/soundwire/qcom.c
> +++ b/drivers/soundwire/qcom.c
> @@ -1940,8 +1940,8 @@ static int qcom_swrm_probe(struct platform_device *pdev)
>  
>  	ret = devm_request_threaded_irq(dev, ctrl->irq, NULL,
>  					qcom_swrm_irq_handler,
> -					IRQF_TRIGGER_RISING |
> -					IRQF_ONESHOT,
> +					(irq_get_trigger_type(ctrl->irq) ?:
> +					 IRQF_TRIGGER_RISING) | IRQF_ONESHOT,
>  					"soundwire", ctrl);
>  	if (ret) {
>  		dev_err(dev, "Failed to request soundwire irq\n");


      reply	other threads:[~2026-12-01 18:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29 15:13 Vladyslav Tymoshchuk
2026-12-01 18:25 ` Srinivas Kandagatla [this message]

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=26a60f1e-1b58-4205-9fd4-76d2ec16ee15@kernel.org \
    --to=srini@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=tvlad744@gmail.com \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.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®