Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Troy Mitchell" <troy.mitchell@linux.spacemit.com>
To: "Linmao Li" <lilinmao@kylinos.cn>,
	"Troy Mitchell" <troy.mitchell@linux.spacemit.com>,
	"Andi Shyti" <andi.shyti@kernel.org>
Cc: "Yixun Lan" <dlan@kernel.org>, "Alex Elder" <elder@riscstar.com>,
	<linux-i2c@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-riscv@lists.infradead.org>, <spacemit@lists.linux.dev>
Subject: Re: [PATCH] i2c: spacemit: request IRQ after controller initialization
Date: Wed, 22 Jul 2026 05:15:29 -0700	[thread overview]
Message-ID: <DK53C3CZF06Q.37189IIFM8VQ3@linux.spacemit.com> (raw)
In-Reply-To: <20260722094302.2284191-1-lilinmao@kylinos.cn>

On Wed Jul 22, 2026 at 2:43 AM PDT, Linmao Li wrote:
> spacemit_i2c_probe() requests the IRQ before it enables the clocks, resets
> the controller and runs init_completion(). If an interrupt is already
> pending, the handler runs too early: it reads registers while the clocks
> are still off and calls complete() on an uninitialized completion. Request
> the IRQ after the controller and completion are initialized, but still
> before the adapter is registered.
>
> Fixes: 5ea558473fa3 ("i2c: spacemit: add support for SpacemiT K1 SoC")
> Signed-off-by: Linmao Li <lilinmao@kylinos.cn>
Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>

This should also be applied to the stable trees. Please add:
Cc: stable@vger.kernel.org # v6.15+

                            - Troy

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2026-07-23  1:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22  9:43 [PATCH] i2c: spacemit: request IRQ after controller initialization Linmao Li
2026-07-22 12:15 ` Troy Mitchell [this message]
2026-07-22 12:20 ` Alex Elder
2026-07-23  2:11 ` [PATCH v2] " Linmao Li

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=DK53C3CZF06Q.37189IIFM8VQ3@linux.spacemit.com \
    --to=troy.mitchell@linux.spacemit.com \
    --cc=andi.shyti@kernel.org \
    --cc=dlan@kernel.org \
    --cc=elder@riscstar.com \
    --cc=lilinmao@kylinos.cn \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=spacemit@lists.linux.dev \
    /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