From: Sasha Levin <sashal@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Igor Korotin <igor.korotin@linux.dev>,
Andi Shyti <andi.shyti@kernel.org>,
Carlos Song <carlos.song@nxp.com>, Frank Li <Frank.Li@nxp.com>,
Pei Xiao <xiaopei01@kylinos.cn>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-next@vger.kernel.org
Subject: Re: linux-next: manual merge of the i2c-rust tree with the origin tree
Date: Mon, 19 Oct 2026 07:48:06 -0400 [thread overview]
Message-ID: <20261019114806.1298980-2-sashal@kernel.org> (raw)
In-Reply-To: <aqK86A1SuLKQP5Gi@sirena.org.uk>
On Thu, Sep 10, 2026 at 03:21:28PM +0100, Mark Brown wrote:
> Today's linux-next merge of the i2c-rust tree got a conflict in:
>
> drivers/i2c/busses/i2c-imx-lpi2c.c
Hi Mark,
The probe hunk of this resolution takes the i2c-rust side, which
reverts
27c9445be86b ("i2c: imx-lpi2c: avoid accessing target registers on master-only controllers")
SCR is written unconditionally again, so master-only controllers such
as i.MX8QM are back to the asynchronous SError at probe. target_supported
is also never set, so lpi2c_imx_register_target() always returns
-EOPNOTSUPP. It builds without warnings, and next-20261016 still has it.
That block should match mainline. The delta against next-20261016 is
below.
The conflict comes back on every merge because rust-i2c-next carries
older copies of mainline's lpi2c commits, for example
90311787f483 ("i2c: imx-lpi2c: reset controller in probe stage")
This is what llminus generated:
diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c
index dd5b8bcd05d04..7302464c371ae 100644
--- a/drivers/i2c/busses/i2c-imx-lpi2c.c
+++ b/drivers/i2c/busses/i2c-imx-lpi2c.c
@@ -1553,13 +1553,23 @@ static int lpi2c_imx_probe(struct platform_device *pdev)
pm_runtime_enable(&pdev->dev);
/*
- * Reset all internal controller registers of both Master and Target
- * to avoid effects of previous status.
+ * Reset all internal controller registers to avoid effects of any
+ * state left over from a previous stage (e.g. the bootloader).
+ *
+ * The Master block (MCR) is present on every controller, so reset it
+ * unconditionally. VERID shows whether the target feature is supported.
+ * Do not touch the Target block (SCR) on a master-only controller to
+ * avoid an asynchronous SError.
*/
writel(MCR_RST, lpi2c_imx->base + LPI2C_MCR);
- writel(SCR_RST, lpi2c_imx->base + LPI2C_SCR);
writel(0, lpi2c_imx->base + LPI2C_MCR);
- writel(0, lpi2c_imx->base + LPI2C_SCR);
+
+ lpi2c_imx->target_supported = !!(readl(lpi2c_imx->base + LPI2C_VERID) &
+ VERID_FEATURE_TARGET_PRESENT);
+ if (lpi2c_imx->target_supported) {
+ writel(SCR_RST, lpi2c_imx->base + LPI2C_SCR);
+ writel(0, lpi2c_imx->base + LPI2C_SCR);
+ }
ret = devm_request_irq(&pdev->dev, lpi2c_imx->irq, lpi2c_imx_isr, IRQF_NO_SUSPEND,
pdev->name, lpi2c_imx);
--
Thanks,
Sasha
prev parent reply other threads:[~2026-10-19 11:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 14:21 Mark Brown
2026-10-19 11:48 ` Sasha Levin [this message]
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=20261019114806.1298980-2-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=andi.shyti@kernel.org \
--cc=broonie@kernel.org \
--cc=carlos.song@nxp.com \
--cc=igor.korotin@linux.dev \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=xiaopei01@kylinos.cn \
/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
all inboxes | Powered by JetHome®