From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795965216; b=NGOn0XUam9zDu1vGbmx9/nYuDG+LmV+/2+tcy+LxSGyvS7bsd8JC0Ep/kcE3z3pdv4mR S4GJIwcWvOWUyuO6+WYKheYyhMNyB4qeua0AGDYutwiCVJeuiB8L9fCp8shN4+a6xpWjN 5rqi8pRtqPKjxIIDpuIsrXEeNLF/N61T+0DPU4IQkzGFY3/MWxoj6xJ1oA6NrZPkIBERs CmYkYPysWNeCs25Nz+cIs9f2tZodhN5shDxTyfC9HbLOMr5khJi6ADSsjZnEO02dGFR6J EvFbagCBJayDs1MjMR92DNdPb/hxeSh3OqcMWoD/6ILwDyJDCBI19SH5yfnnlz3UU7w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795965216; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=GNBnNzAJO9SRVoNUePHFEEn0xyw62U3EUlfM/cUcjHk=; b=4PpJkzRvOAn1PO+sHF5CrFmYiV0pEMuYbYCEvGf+Hb8/XDevTjEKjnudLYhbTA88H8s7 ZS2qWB0Djbr9GuS6tBsYXkXtTR+oRDct0b8A00pwbW/9LiuW3mxTcVtS2OdS9PtvG/iYY CnwnmCxOwMJ24pE98osK6jl+MSE7LHQh7OU2FwnpIr+Au3C0UraTWTHUzHVGYMLITNziH uxPd4BZYJtx47ETei3AdeRKLIN3CY5JGLQ1QH+u5wsxaUujMnLvQIxAg/7gCTPFgwluyZ EDNYmONg3QeDUv15WNWI7Q1LPpX2TjCCIe9dkfJL/D+ncaO1xNJi6xveTfOAOY5vCaw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Q20BMdpg; arc=none smtp.remote-ip=209.85.128.44 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1905606A325 for ; Sun, 29 Nov 2026 15:13:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D1905606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Q20BMdpg Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4bb5b8ef642so80258995e9.1 for ; Sun, 29 Nov 2026 07:13:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795965214; x=1796570014; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=GNBnNzAJO9SRVoNUePHFEEn0xyw62U3EUlfM/cUcjHk=; b=Q20BMdpg63e1FcHQryDhsoxapcOpUCXIRRbwvPecaZ+8f+yrQztxpL5Y2p5/FRfuEf kJ0iW5RrM14jmPBygg5qgoJTss+WwtJrHvX9bWqXXvZ9MSucf1CINElTxfJodkrAOAjj 5gaRS1mwn8DIOrPnLXvPpSYyYNesWLl1jVSNt2nGqG7OPZ7yInKuzq5iHSQLSpT/hCP0 eW2yKPIkdwNHeLuJrIck3NlU8/yC3RjAckYJhm4uo2WE6liesyP4h4TieO5VkFjkq4Js 5rsPmfTwZMuK7pkqEFINkU6r2f7BpD/nyQxMmVL2D4zBhA0Fw8Y89pHn171Mk1oDwEXr 0VpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795965214; x=1796570014; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=GNBnNzAJO9SRVoNUePHFEEn0xyw62U3EUlfM/cUcjHk=; b=mZAiD/xU2DcBLhcUri15vEO3AOLbf06vSmbIAuI4Ly5l4K/MMGFdA1DMo7s/978vMu M8ytXTwsDQupmIB8ccF5QpwCx1ZwkgEwglM074TohGCtvdewRGvAiBMT07qIVH/Yc9cd CkK1X2/dnKrcXFqQbSpq9VsWfjpP/fXA2QlqHdUPakwG2yc6R5Afa5EQ8hJJ9YaZg7cH nWLYCiTkp2przFkS8eq6EXCoysZ523vRn0UJWB4JwvI46AjelHm2H3TXmfqrp42VEdG8 J2cWxgCMbCHyM5nOVuKxTnVtN2Ffo5qRcebdeNeI6Dobf/6S3V768FTn+viuMzLqNBEh 4sMQ== X-Forwarded-Encrypted: i=1; AL+hErEvoGEH84WIDy4RMeFr0FzeEwlJgPNn1H/mprekr6YLh8RIzDZ8qUlfjg+Ag1C5c0Pndm8SafgKR6lBPTM=@vger.kernel.org X-Gm-Message-State: APuU4Z9DCN+6kdZuik744O+PHLQ6ycJIiq/Nb+JUa3Dn7XPyNlxrqfP+ xUncRRA667+Ajt6XjtQuns3/RWr1N/h183pSZ4GfrDn6791tqZnv1Kia X-Gm-Gg: AZFdTZeYP+mJwCUA9BrP8Y/amKE16Boqjg3nQO1Mt5pDNeLKDuJHfMfOBR+9sUoP2IS PtQr6fBd2qzCbE28EXeAS2gkm4+ENyeejn/7RLCZ/aGm5AxUv/qLlE6xSh9OUMr/BfNytW8HkxC YZvQowZou6WtmiqSJ3q7fR2MqkxvO6cRVifjNUmysA/di3UyzAmSEEmS2Ew+9W/QAoOWai4o0Zk 6rHGtSGyF0IwKCP9RK3Kl2TR2xS8dZe204lqw2hwMxq0L6lSTDoybMM+Tym1XU7845N/XeAiQp/ yt30r8pxg4IaRh5seylhLiIs1TRYsSbDT+rBbCKRWavdnPNZJ/U8AKvvRlA2XiwTLxejracDuse Sich8CiB4CnIsrq53Z+3iIXKBA5Cp199lTGUOtnHHssWsdSjWC0uevz3TKvPKtr3S48WEtY3DF+ BIKtWiYPMXqBp98p3+4/c/Gt1SxaQko3Fb2jfoBifsHLMmmNjWQxrbpkKebfApEyQN9QVxOHHTu gQRYk4AyxXQdHDxgVZS4h5jruY/sM9HP8GOcSSw9tNd42WTmmqg5unu36RFfydnKNIZlvKVEZti Y1KEB+xurAVbNfLXZej/oWN+HssmeHBPhWeAyR8D9b2OeNZuXoH5IaHx X-Received: by 2002:a05:600c:4e0b:b0:4bb:6f45:2a79 with SMTP id 5b1f17b1804b1-4bb88817920mr659826925e9.22.1795965214120; Sun, 29 Nov 2026 07:13:34 -0800 (PST) Received: from localhost.localdomain ([188.190.249.216]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb906635c7sm566831925e9.2.2026.11.29.07.13.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 07:13:33 -0800 (PST) From: Vladyslav Tymoshchuk To: 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: [PATCH] soundwire: qcom: Take the interrupt trigger type from DT Date: Sun, 29 Nov 2026 17:13:23 +0200 Message-ID: <20261129151323.1879-1-tvlad744@gmail.com> X-Mailer: git-send-email 2.45.1.windows.1 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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"); -- 2.43.0