From: Troy Mitchell <troy.mitchell@linux.spacemit.com>
To: Yixun Lan <dlan@gentoo.org>,
linux-kernel@vger.kernel.org, Lee Jones <lee@kernel.org>,
Sebastian Reichel <sre@kernel.org>,
Troy Mitchell <troy.mitchell@linux.spacemit.com>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
"open list:RISC-V ARCHITECTURE:Keyword:riscv"
<linux-riscv@lists.infradead.org>,
"open list:RISC-V SPACEMIT SoC Support:Keyword:spacemit"
<spacemit@lists.linux.dev>,
"open list:SYSTEM RESET/SHUTDOWN DRIVERS"
<linux-pm@vger.kernel.org>
Subject: Re: [PATCH v3 1/2] driver: reset: spacemit-p1: add driver for poweroff/reboot
Date: Wed, 22 Oct 2025 13:42:04 +0800 [thread overview]
Message-ID: <52468F28CD7B50FD+aPhurJD4HTXqIGDT@kernel.org> (raw)
In-Reply-To: <aPhtd0j6iBpqiGUQ@aurel32.net>
> > > diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
> > > index 8248895ca9038..6577d73edbda4 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
> > ..
> > > + select MFD_SPACEMIT_P1
> > I'd suggest to use "depends on" instead of "select", the reason is that
> > using "select" will sometimes ignore the dependency, considering
> > the reset driver here is tightly coupled with P1, so I think it's
> > reasonable to switch to use "depends on", also refer below link
> >
> > https://lxr.linux.no/#linux+v6.7.1/Documentation/kbuild/kconfig-language.rst#L144
> >
> > select should be used with care. select will force
> > a symbol to a value without visiting the dependencies.
> > By abusing select you are able to select a symbol FOO even
> > if FOO depends on BAR that is not set.
> > In general use select only for non-visible symbols
> > (no prompts anywhere) and for symbols with no dependencies.
> > That will limit the usefulness but on the other hand avoid
> > the illegal configurations all over.
>
> Thanks for the pointer, I'll fix that in the next version. I used
> REGULATOR_SPACEMIT_P1 and RTC_DRV_SPACEMIT_P1 as examples, they'll also
> need to be fixed.
Yes, I have said here[1].
Do you want to fix that? If you don't have time, I can do it.
>
> Note also that without the select, a default value has to be added to
> MFD_SPACEMIT_P1.
Yes, I will add it in my patch. Thanks.
- Troy
Link: https://lore.kernel.org/all/6DB8C5F20B3FAC2E+aPhfoRXlJtJymlB5@kernel.org/ [1]
> otherwise this makes the default values on the
> regulator, rtc and reboot drivers useless.
>
> --
> Aurelien Jarno GPG: 4096R/1DDD8C9B
> aurelien@aurel32.net http://aurel32.net
>
WARNING: multiple messages have this Message-ID (diff)
From: Troy Mitchell <troy.mitchell@linux.spacemit.com>
To: Yixun Lan <dlan@gentoo.org>,
linux-kernel@vger.kernel.org, Lee Jones <lee@kernel.org>,
Sebastian Reichel <sre@kernel.org>,
Troy Mitchell <troy.mitchell@linux.spacemit.com>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
"open list:RISC-V ARCHITECTURE:Keyword:riscv"
<linux-riscv@lists.infradead.org>,
"open list:RISC-V SPACEMIT SoC Support:Keyword:spacemit"
<spacemit@lists.linux.dev>,
"open list:SYSTEM RESET/SHUTDOWN DRIVERS"
<linux-pm@vger.kernel.org>
Subject: Re: [PATCH v3 1/2] driver: reset: spacemit-p1: add driver for poweroff/reboot
Date: Wed, 22 Oct 2025 13:42:04 +0800 [thread overview]
Message-ID: <52468F28CD7B50FD+aPhurJD4HTXqIGDT@kernel.org> (raw)
In-Reply-To: <aPhtd0j6iBpqiGUQ@aurel32.net>
> > > diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
> > > index 8248895ca9038..6577d73edbda4 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
> > ..
> > > + select MFD_SPACEMIT_P1
> > I'd suggest to use "depends on" instead of "select", the reason is that
> > using "select" will sometimes ignore the dependency, considering
> > the reset driver here is tightly coupled with P1, so I think it's
> > reasonable to switch to use "depends on", also refer below link
> >
> > https://lxr.linux.no/#linux+v6.7.1/Documentation/kbuild/kconfig-language.rst#L144
> >
> > select should be used with care. select will force
> > a symbol to a value without visiting the dependencies.
> > By abusing select you are able to select a symbol FOO even
> > if FOO depends on BAR that is not set.
> > In general use select only for non-visible symbols
> > (no prompts anywhere) and for symbols with no dependencies.
> > That will limit the usefulness but on the other hand avoid
> > the illegal configurations all over.
>
> Thanks for the pointer, I'll fix that in the next version. I used
> REGULATOR_SPACEMIT_P1 and RTC_DRV_SPACEMIT_P1 as examples, they'll also
> need to be fixed.
Yes, I have said here[1].
Do you want to fix that? If you don't have time, I can do it.
>
> Note also that without the select, a default value has to be added to
> MFD_SPACEMIT_P1.
Yes, I will add it in my patch. Thanks.
- Troy
Link: https://lore.kernel.org/all/6DB8C5F20B3FAC2E+aPhfoRXlJtJymlB5@kernel.org/ [1]
> otherwise this makes the default values on the
> regulator, rtc and reboot drivers useless.
>
> --
> Aurelien Jarno GPG: 4096R/1DDD8C9B
> aurelien@aurel32.net http://aurel32.net
>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-10-22 5:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 20:11 [PATCH v3 0/2] driver: reset: spacemit-p1: add driver for poweroff/reboot Aurelien Jarno
2025-10-21 20:11 ` Aurelien Jarno
2025-10-21 20:11 ` [PATCH v3 1/2] " Aurelien Jarno
2025-10-21 20:11 ` Aurelien Jarno
2025-10-22 0:48 ` Yixun Lan
2025-10-22 0:48 ` Yixun Lan
2025-10-22 5:36 ` Aurelien Jarno
2025-10-22 5:36 ` Aurelien Jarno
2025-10-22 5:42 ` Troy Mitchell [this message]
2025-10-22 5:42 ` Troy Mitchell
2025-10-22 16:48 ` Aurelien Jarno
2025-10-22 16:48 ` Aurelien Jarno
2025-10-23 1:05 ` Troy Mitchell
2025-10-23 1:05 ` Troy Mitchell
2025-10-21 20:12 ` [PATCH v3 2/2] mfd: simple-mfd-i2c: add a reboot cell for the SpacemiT P1 chip Aurelien Jarno
2025-10-21 20:12 ` 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=52468F28CD7B50FD+aPhurJD4HTXqIGDT@kernel.org \
--to=troy.mitchell@linux.spacemit.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=dlan@gentoo.org \
--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=spacemit@lists.linux.dev \
--cc=sre@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.