From: Mikko Perttunen <mperttunen@nvidia.com>
To: Dmitry Osipenko <digetx@gmail.com>,
Andi Shyti <andi.shyti@kernel.org>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>
Cc: linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: tegra: Don't mark devices with pins as IRQ safe
Date: Mon, 02 Feb 2026 14:08:47 +0900 [thread overview]
Message-ID: <3325924.5fSG56mABF@senjougahara> (raw)
In-Reply-To: <20260202-i2c-dpaux-irqsafe-v1-1-5b1847e8bc97@nvidia.com>
On Monday, February 2, 2026 1:42 PM Mikko Perttunen wrote:
> 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.
>
> Discovered through lockdep.
Eh, I guess not lockdep, just normal lock debugging..
>
> Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
> ---
> drivers/i2c/busses/i2c-tegra.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> index bec619b9af4e..4eaeb395d5db 100644
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c
> @@ -2047,8 +2047,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);
>
> ---
> base-commit: 4f938c7d3b25d87b356af4106c2682caf8c835a2
> change-id: 20260202-i2c-dpaux-irqsafe-edc04628b401
>
>
next prev parent reply other threads:[~2026-02-02 5:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-02 4:42 [PATCH] i2c: tegra: Don't mark devices with pins as IRQ safe Mikko Perttunen
2026-02-02 5:08 ` Mikko Perttunen [this message]
2026-02-05 10:47 ` Andi Shyti
2026-02-06 3:38 ` Mikko Perttunen
2026-02-07 0:25 ` Andi Shyti
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=3325924.5fSG56mABF@senjougahara \
--to=mperttunen@nvidia.com \
--cc=andi.shyti@kernel.org \
--cc=digetx@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=thierry.reding@gmail.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