mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nguyen Cong Thanh <congthanh.ml.2509@gmail.com>
To: mfd@lists.linux.dev
Cc: Lee Jones <lee@kernel.org>, Heiko Stuebner <heiko@sntech.de>,
	Peter Geis <pgwipeout@gmail.com>,
	Quentin Schulz <quentin.schulz@cherry.de>,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] mfd: rk8xx-core: Leave a warm restart to the next handler
Date: Fri,  4 Dec 2026 09:48:39 +0700	[thread overview]
Message-ID: <20261204024840.159492-1-congthanh.ml.2509@gmail.com> (raw)
In-Reply-To: <sashiko-outbox-248402@kernel.org>

On Thu, 03 Dec 2026 18:35:35 +0000, sashiko-bot@kernel.org wrote:
> Does skipping DEV_RST leave RK817_SLPPIN_FUNC_MSK armed with
> SLPPIN_DN_FUN across a normal warm reboot?

Yes, I think it does. kernel_restart() runs device_shutdown() before
the restart handlers, rk8xx_shutdown() sets SLPPIN_DN_FUN in
RK817_SYS_CFG(3) on RK809/RK817 whatever system_state is, and with
DEV_RST skipped nothing clears it: rk817_pre_init_reg[] does not touch
it, and only rk8xx_resume() writes SLPPIN_NULL_FUN.

My tests did not cover this. The warm restarts I ran were all
reboot=panic_warm after a panic, which goes through emergency_restart()
and does not call device_shutdown(). A plain reboot with reboot=warm,
which does run rk8xx_shutdown(), was not tested.

For v2 I would add a patch before this one, so that rk8xx_shutdown()
sets the power-down function only when system_state is
SYSTEM_POWER_OFF and a restart leaves the sleep pin function as it
was. Lee, Peter, would you rather have that, or the sleep pin function
cleared at probe in rk817_pre_init_reg[], or both? Before v2 I will
also run plain warm reboots on the board and read RK817_SYS_CFG(3)
after them.

> Should it include:
>
>   Fixes: 56f216d8efbc ("mfd: rk808: Add reboot support to rk808.c")

I left it out on purpose: the handler has restarted the PMIC in every
mode since that commit, so this is a change of behaviour rather than
a fix of a regression. I can add the tag if Lee prefers.

Thanks,
Nguyen Cong Thanh

       reply	other threads:[~2026-12-04  2:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <sashiko-outbox-248402@kernel.org>
2026-12-04  2:48 ` Nguyen Cong Thanh [this message]
2026-12-03 17:29 Nguyen Cong Thanh

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=20261204024840.159492-1-congthanh.ml.2509@gmail.com \
    --to=congthanh.ml.2509@gmail.com \
    --cc=heiko@sntech.de \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mfd@lists.linux.dev \
    --cc=pgwipeout@gmail.com \
    --cc=quentin.schulz@cherry.de \
    /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®