Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796149535; b=ryDWlNL7YOY6lNBCWYV4MgBN5pp/QeLQ8uVUMT23kQNYZdpIindzy7492YCypITohEpE fnOf1+epg8r8FoxOw0bf1vFwhy1URtNsbTys07iPqY56g/Y4qmOL8adFvpnpb6tEak/1i DwJMGA5pvaZvh1iG+ln9Gjr43SRcCvhBnN/RIlsXAN/70Y59BguOZxKg9SI0Wd3jl3iGK P+obcGapd4e+m52SUORNvZ5rihqNl8v50/UrNSJw2YsrWbGNiHXV019Ap+GOu+hFeJZBr A93Gas3Ia/stZQU9ADoyKkld0eCWW3M8JyUuitCfup1q1S/kBXwxvM2r8uKD8gSvD+A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796149535; h=Received:DKIM-Signature:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:From:Content-Language:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=V+HclsFf229zpZFZHCwwSPihvEKXZl43oTtx2ruhD1g=; b=URtZg2mKbSjf4ghRb3FN99GrF9ufhgNfSvcawG139pCHgSNM8KqOG/yIo53iVhxoeCay 3dvNgFz2SfTHNgTPutXxMPTposDoDVFQBBKt5nNbQEMm7GXJvjummv0BvfhR+rI96IBgo i7juWWaVckKrrV/j3ewAir//A1rZol/SeyEUF27CzFqnj8As8sPv9aa7BwlU2ViYhTCX9 ojIYDpKmqesKW6yQy3SYfIROh8quJeGS41ZwyMw3M6qTgi2iBDpJT2ZhsN92p2nrIQD1Z vWjM4SOY5F84H0TSICH7JyaV6RukjMZcvbxaE2lDKBkVLShx3Tsvez5+P7tWKAHSVIw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="GCV//4GF"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E352D606A31A; Tue, 1 Dec 2026 18:25:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=GCV//4GF Received: by smtp.kernel.org (Postfix) with ESMTPSA id 672321F00893; Tue, 1 Dec 2026 18:25:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796149534; bh=V+HclsFf229zpZFZHCwwSPihvEKXZl43oTtx2ruhD1g=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=GCV//4GFzj8rq9ais6QYJwH5ZcUR9TXvsSmosIla1rkY5mxfcQrXM9iGSiKXFWoxV 5HseRKaoQ6KBMh/ArVIv4G87Fv+Lk47fAVfv6z8d9dKl4U6Aih29CHaU3Ps1qrMIXb kyi2hCLzTsxYDl4gCF8Xuc89wrXfCRLoYk9mbj1kfHSo7edZVu6pyI20m/nKZ+P+r1 36xvtrXLduldKyn/U2pWDFTlTMrCXK9dvLV8ZVj6XEzGqWfTFZF2t9hGRQaXAg0BhP V27zcbpa55/K8odbN4HTsjYrp1J+iH4IU8vp1m8qq85Aa073d1SkLRaz3Gq2ewq5DA iJ6VPqkOz+W6w== Message-ID: <26a60f1e-1b58-4205-9fd4-76d2ec16ee15@kernel.org> Date: Tue, 1 Dec 2026 18:25:31 +0000 X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] soundwire: qcom: Take the interrupt trigger type from DT To: Vladyslav Tymoshchuk , 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 References: <20261129151323.1879-1-tvlad744@gmail.com> From: Srinivas Kandagatla Content-Language: en-US In-Reply-To: <20261129151323.1879-1-tvlad744@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 Reviewed-by: Srinivas Kandagatla --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");