From: Aurelien Jarno <aurelien@aurel32.net>
To: Yixun Lan <dlan@gentoo.org>
Cc: Emil Renner Berthing <emil.renner.berthing@canonical.com>,
Andreas Schwab <schwab@suse.de>, Yao Zi <ziyao@disroot.org>,
Troy Mitchell <troy.mitchell@linux.spacemit.com>,
linux-kernel@vger.kernel.org, Lee Jones <lee@kernel.org>,
Sebastian Reichel <sre@kernel.org>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
linux-riscv@lists.infradead.org, spacemit@lists.linux.dev,
linux-pm@vger.kernel.org
Subject: Re: [PATCH v4 1/2] driver: reset: spacemit-p1: add driver for poweroff/reboot
Date: Mon, 27 Oct 2025 14:34:33 +0100 [thread overview]
Message-ID: <aP906fAZZfFXp-2D@aurel32.net> (raw)
In-Reply-To: <20251027103147-GYA1541054@gentoo.org>
On 2025-10-27 18:31, Yixun Lan wrote:
> Hi
>
> On 03:17 Mon 27 Oct , Emil Renner Berthing wrote:
> > Quoting Yao Zi (2025-10-27 10:24:30)
> > > On Mon, Oct 27, 2025 at 10:03:44AM +0100, Andreas Schwab wrote:
> > > > On Okt 27 2025, Yao Zi wrote:
> > > > > On Mon, Oct 27, 2025 at 11:20:33AM +0800, Troy Mitchell wrote:
> > > > >> On Sun, Oct 26, 2025 at 11:41:14PM +0100, Aurelien Jarno wrote:
> > > > >> > diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
> > > > >> > index 8248895ca9038..61c16f3d5abc7 100644
> > > > >> > --- a/drivers/power/reset/Kconfig
> > > > >> > +++ b/drivers/power/reset/Kconfig
> > > > >> > @@ -283,6 +283,15 @@ config POWER_RESET_KEYSTONE
> > > > >> > help
> > > > >> > Reboot support for the KEYSTONE SoCs.
> > > > >> >
> > > > >> > +config POWER_RESET_SPACEMIT_P1
> > > > >> > + tristate "SpacemiT P1 poweroff and reset driver"
> > > > >> > + depends on ARCH_SPACEMIT || COMPILE_TEST
> > > > >> > + depends on MFD_SPACEMIT_P1
> > > > >> > + default m
> > > > >> default m if ARCH_SPACEMIT? Or default ARCH_SPACEMIT?
> > > > >> I believe that reboot and shutdown are actually essential functionalities,
> > > > >> so it might make more sense: default ARCH_SPACEMIT?
> > > > >
> > > > > I don't think there's anything preventing it to be built as module by
> > > > > default: even though it's "essential", it's unnecessary during kernel
> > > > > and userspace startup, thus I see no reason to build it in the image.
> > > >
> > > > Wouldn't it be needed in a reboot-on-panic situation?
> > >
> > > Oops, yeah, I missed this stuff. Seems systemd automatic boot assessment
> > > could switch to another boot option if one fails to boot. And if it's
> > > caused by a (very early) kernel panic, then reboot support does play a
> > > part here.
> >
> > But if systemd is running then you've at least got as far as the initramfs,
> > and have the module available. So I don't see the problem.
> >
> In rare case, if got kernel panic before load this module, then we
> should really fix it instead.. Besides, there is no restriction to prevent
> user to make this driver as built-in, right?
>
> So I think this isn't really a big problem either
A possible compromise here might be to use "default MFD_SPACEMIT_P1".
This would defer the decision to another level, but I think it makes
sense to have all parts of the MFD either built-in or as modules.
Regards
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://aurel32.net
next prev parent reply other threads:[~2025-10-27 13:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-26 22:41 [PATCH v4 0/2] driver: reset: spacemit-p1: add driver for poweroff/reboot Aurelien Jarno
2025-10-26 22:41 ` [PATCH v4 1/2] " Aurelien Jarno
2025-10-27 3:20 ` Troy Mitchell
2025-10-27 6:01 ` Aurelien Jarno
2025-10-27 6:06 ` Troy Mitchell
2025-10-27 6:24 ` Yao Zi
2025-10-27 9:03 ` Andreas Schwab
2025-10-27 9:24 ` Yao Zi
2025-10-27 10:17 ` Emil Renner Berthing
2025-10-27 10:31 ` Yixun Lan
2025-10-27 13:34 ` Aurelien Jarno [this message]
2025-10-27 13:56 ` Troy Mitchell
2025-10-26 22:41 ` [PATCH v4 2/2] mfd: simple-mfd-i2c: add a reboot cell for the SpacemiT P1 chip Aurelien Jarno
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=aP906fAZZfFXp-2D@aurel32.net \
--to=aurelien@aurel32.net \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=dlan@gentoo.org \
--cc=emil.renner.berthing@canonical.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=schwab@suse.de \
--cc=spacemit@lists.linux.dev \
--cc=sre@kernel.org \
--cc=troy.mitchell@linux.spacemit.com \
--cc=ziyao@disroot.org \
/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