Linux SpacemiT device drivers
 help / color / mirror / Atom feed
From: "Troy Mitchell" <troy.mitchell@linux.spacemit.com>
To: "Pei Xiao" <xiaopei01@kylinos.cn>, <shuwei.wu@mailbox.org>,
	<troy.mitchell@linux.spacemit.com>, <rafael@kernel.org>,
	<linux-pm@vger.kernel.org>, <linux-riscv@lists.infradead.org>,
	<spacemit@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
	<dlan@kernel.org>, <daniel.lezcano@kernel.org>
Subject: Re: [PATCH v2] thermal: spacemit: k1: add shutdown action and reorder registration order
Date: Wed, 22 Jul 2026 00:54:41 -0700	[thread overview]
Message-ID: <DK4XSEPSTY3I.O9ZFCZ9BJGNW@linux.spacemit.com> (raw)
In-Reply-To: <1967d2bcc8fede6fbd25fc8eee07f2873fb41472.1784184867.git.xiaopei01@kylinos.cn>

On Thu Jul 16, 2026 at 12:04 AM PDT, Pei Xiao wrote:
> Add a devm action to clean hardware interrupts, sampling, and control
> registers on driver unbind, mirroring what k1_tsensor_init() sets up.
>
> Reorder the registration order within probe(): register the thermal
> zones first, then request the IRQ, and register the shutdown action
> last.  On removal, the hardware interrupt is disabled first, then the
> IRQ is released, and finally the thermal zones are released.  This
> avoids the IRQ thread accessing an already unregistered thermal zone
> during devres cleanup.
>
> Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>

Thanks.

      reply	other threads:[~2026-07-22  7:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16  7:04 [PATCH v2] thermal: spacemit: k1: add shutdown action and reorder registration order Pei Xiao
2026-07-22  7:54 ` Troy Mitchell [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=DK4XSEPSTY3I.O9ZFCZ9BJGNW@linux.spacemit.com \
    --to=troy.mitchell@linux.spacemit.com \
    --cc=daniel.lezcano@kernel.org \
    --cc=dlan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=rafael@kernel.org \
    --cc=shuwei.wu@mailbox.org \
    --cc=spacemit@lists.linux.dev \
    --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