Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.48 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795965216; b=016ZXUx6WoIxkLrJ/92+nflSZEkwnLRqR2ufslSNsWiDb5D9iNP7BYzJUaTM1Z+O6e6O vhXGU+jwcDISfMW9MFybRUyndGdxu0NZxcBD1xVxJeDeilnIBD+k9GQAgkgyIhEdhTH/u c9EMEDhZPhLpRicBbtqVm5VFeke8ujfapQEk9zQeeZGhX8EgyIQBPnUfSeBJNwBsniuXy guEern7O9rc0cLookEv5jxgdvjyVRr0PEP+JBceDqXgAW28BpWaeSEJWqAizaQ28mYkme lKY0LnDozC1j3GG7HhwJZUg9KdIlYnBmRXbq8Vv4rm1opfmW+rcZeVLLJ1HaFCt+kWA== 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=ZdFMIsg+i0poTKmshLHCMcZvhnBHO/n2xxEvmxa/QJuzu68OAbS0AgHiMJweeLgOxIXc 5NR5P6O360KPNyt/hy/Hu/Dz77rF4gqBTd5ZO8vPt5InOdffGWdQ5+hj5A4ZqY71be5u5 mQ0Ls3xGEmIlGLfAVlgL0uBL1o8LWJC8EZarOKcd4BSo1MEGB0G8ui3lqZZ+ntTHtPBT0 O0M8227eBy3vSzHEsqBP3swxwHDfNTjK4cFU8RMU7K3i+ikT3YSIjYNA4pItE/21mvUMq VMcAaFW4C0pjBl0G3sx5/v2nyGZrDpLp3KC5ksz+/3h1Y4nRmzkGeKQxz7SjkBPniSg== 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.48 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 C5E41606A68F for ; Sun, 29 Nov 2026 15:13:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C5E41606A68F 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-f48.google.com with SMTP id 5b1f17b1804b1-4bb6057b333so46704785e9.3 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=UZbnoDP/PB34NTFoJa/Rm/XrCIeRpOjnmjPaO4uUFuEx+KusvuZLCol6+64Cdchazp YIXiCeua818UjnBPN9GshB0vPYLSPlhW2zpG23ZQt88Bt9yBDK6qvY+9LuBBrDdbGIMU ksPs1HVqAovMUq44FZUBgH0Mg/1QHdogC9goDw82W7+yFLExbItby4j9uSdAAq8tTV7p qQu7/WSleuAlnhTDfKSwt5NPyGWte50plqfJwXwSnstAIvroZa7Z6f+S6gBhMStoesBU NKHDVQ9pTAGhwBCq0QqZG+ubKY6Rh/R9ghQRvixtk7mLGqC+/iAaULIPUfOW4FrXS3nh ynQA== X-Forwarded-Encrypted: i=1; AL+hErFZTfl3hmURyJSGttG25//orkpGXXyt9A8DaKjfrNAvdVf2G/ohR2poQrOVkNg9zQX7ar7z8f/ryd5JtwFf@vger.kernel.org X-Gm-Message-State: APuU4Z/sYVXX2BGhm5yGr8Hhbfnt2VP0x3k26P+g0R79LcqAG009+Qt6 HJYFFHCMpwfY4G7gbcR/wDrq07H2TWa+btkQBuiGv+1RuhbDxhK+BID/RfK+Mvd5t9U= X-Gm-Gg: AZFdTZcuF8dBd5J/nXgulm14GXuB/wrRLRZIQRLPWQJfAIpIOHnFmfTryVsGejg0885 7+oZvTNdWLtNnyHr2n0qzjYnru0n8VI3cCKQ5ao/vLmVA8KpsyCFTWI6Dyf2G3TJI1r9v3sEWoy 6FPvHLBpWu7BH41G44bRibdz5fkNucRWEHxETYFC286epo1sZx4HBBBDX1i6IdlE0PKGE9EkPD3 i2uSAWqIU7S+kaPRl0qrbv4mtaq7VSzWTvhNTev8m5Bi52Tp3lQYrLx93QD2KY4fUp+jAfExScJ lxnUrJdbnQrWmYHQAnn94BI1qqhZ8F/cp5qtivk1bhCTDfz6zA2PxKB/igvrYnacvB/wnqjiZCh NnprKN53uoHfarO9nT6GvY9hH0rRA+gMwN+OOnK2WW+VSEwdTTa7s2yr2Xyn6CRXQ8/YM/HB+mS gZAr6kJQgQuz4ji4W2mynbCCvGJFapADgCGJ51h83rwiYSF/EuWZrSe6V1P2+yzL3Ka3rIfJnPV YrXnHt59yNUEE2ZroL3wKqVhbIT7muUFZmfmrW2iMCnrTawahF8a7JMx62JrYSjMruIRGTcaGVX 3nDJhPSYsn0JVu3DiZ2I4LDRywkiIi9awuAeOic3N97tCJuuOvSixVmN 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-arm-msm@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