[PATCH v2 1/2] driver: reset: spacemit-p1: add driver for poweroff/reboot
Emil Renner Berthing
emil.renner.berthing at canonical.com
Mon Oct 20 02:55:09 PDT 2025
Quoting Aurelien Jarno (2025-10-20 06:55:37)
> Hi Emil,
>
> On 2025-10-19 22:53, Emil Renner Berthing wrote:
> > On Sun, 19 Oct 2025 at 22:34, Aurelien Jarno <aurelien at aurel32.net> wrote:
> > > diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
> > > index 8248895ca9038..063202923d95d 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
> > > + bool "SpacemiT P1 poweroff and reset driver"
> >
> > The driver code looks to be written to work as a module, but here it
> > says "bool" not "tristate".
>
> I have just tested to build it as a module, and it indeed works that
> way. I'll change that to tristate in the next version.
>
> > > + depends on ARCH_SPACEMIT || COMPILE_TEST
> > > + select MFD_SPACEMIT_P1
> > > + default ARCH_SPACEMIT
> >
> > If it does work as a module I'd prefer "default m" here.
>
> Do you mean "default m" or "default m if ARCH_SPACEMIT"?
Just "default m" should be fine since the driver already depends on
ARCH_SPACEMIT, but the 2nd version is more explicit.
A quick grep doesn't show an overwhelming majority of one over the other, so I
guess it's up to the maintainers.
/Emil
More information about the linux-riscv
mailing list