From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C0521E5724; Wed, 8 Apr 2026 18:13:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775671982; cv=none; b=ZSvW6SgBen2LdR6HZktEfxOk/C8gv3V7aMafMjpE5pIkGV6uUSN6/UY9ANEYS2INh+2IxjyL32cy/E8mdPO13n9BPe3m90MiOmYycCt3vtb86LGv/dX29NMPt3JcMWhPcFtKc7MXaKqWKu/oGetQfKE3c2UCGv7qXjCpPwueRzg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775671982; c=relaxed/simple; bh=M3Co1hDHW4PDw8n7kGP1FnysaWPwI3ediErTB2KbXmY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WzCwpYurGhFTa09l0YbyFsQwbqptoDHSN1zb33N2UM42M9zgTK6ivIvY/1T21oq5sLLi9yCd+zg7v8Vzr1d8ZLlZts4f8vbae069CfyGRBYiUCl4wC39mxbCR7CO8nRNrBt7jj3WYEaTiX1FgYdIKAbMVbY5J9YLrSDvH1fJNGY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=A8NkEfXF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="A8NkEfXF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6D44C19421; Wed, 8 Apr 2026 18:13:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1775671982; bh=M3Co1hDHW4PDw8n7kGP1FnysaWPwI3ediErTB2KbXmY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A8NkEfXF603RL41/tWSLz1IJjU/uPUPrWk0y+RtbFAMVV65dvExmrb9XmyDGLt22A 5FIkjhcftI88mYNXphEA4UjG9EXCWahezptr0OaQZS3IS/M1fteUfWRBfd4AtVWERl txH4DGXeFIzREgfSXyr6zUc8qNvtX2nG0KVBNWdQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mikko Perttunen , Russell King , Linus Torvalds , Sasha Levin Subject: [PATCH 6.1 143/312] i2c: tegra: Dont mark devices with pins as IRQ safe Date: Wed, 8 Apr 2026 20:01:00 +0200 Message-ID: <20260408175939.110903893@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260408175933.715315542@linuxfoundation.org> References: <20260408175933.715315542@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mikko Perttunen [ Upstream commit ec69c9e88315c4be70c283f18c2ff130da6320b5 ] I2C devices with associated pinctrl states (DPAUX I2C controllers) will change pinctrl state during runtime PM. This requires taking a mutex, so these devices cannot be marked as IRQ safe. Add PINCTRL as dependency to avoid build errors. Signed-off-by: Mikko Perttunen Reported-by: Russell King Link: https://lore.kernel.org/all/E1vsNBv-00000009nfA-27ZK@rmk-PC.armlinux.org.uk/ Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- drivers/i2c/busses/Kconfig | 2 ++ drivers/i2c/busses/i2c-tegra.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index e50f9603d189e..3dfdf91a5085b 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -1114,6 +1114,8 @@ config I2C_TEGRA tristate "NVIDIA Tegra internal I2C controller" depends on ARCH_TEGRA || (COMPILE_TEST && (ARC || ARM || ARM64 || M68K || RISCV || SUPERH || SPARC)) # COMPILE_TEST needs architectures with readsX()/writesX() primitives + depends on PINCTRL + # ARCH_TEGRA implies PINCTRL, but the COMPILE_TEST side doesn't. help If you say yes to this option, support will be included for the I2C controller embedded in NVIDIA Tegra SOCs diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index 850d76d9114c4..7e25e6fb915a2 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c @@ -1816,8 +1816,11 @@ static int tegra_i2c_probe(struct platform_device *pdev) * * VI I2C device shouldn't be marked as IRQ-safe because VI I2C won't * be used for atomic transfers. ACPI device is not IRQ safe also. + * + * Devices with pinctrl states cannot be marked IRQ-safe as the pinctrl + * state transitions during runtime PM require mutexes. */ - if (!IS_VI(i2c_dev) && !has_acpi_companion(i2c_dev->dev)) + if (!IS_VI(i2c_dev) && !has_acpi_companion(i2c_dev->dev) && !i2c_dev->dev->pins) pm_runtime_irq_safe(i2c_dev->dev); pm_runtime_enable(i2c_dev->dev); -- 2.53.0