[PATCH v2 1/2] driver: reset: spacemit-p1: add driver for poweroff/reboot

Yixun Lan dlan at gentoo.org
Sun Oct 19 17:05:37 PDT 2025


Hi Aurelien, 

On 22:53 Sun 19 Oct     , Emil Renner Berthing wrote:
> On Sun, 19 Oct 2025 at 22:34, Aurelien Jarno <aurelien at aurel32.net> wrote:
> >
> > This driver implements poweroff/reboot support for the SpacemiT P1 PMIC
> > chip, which is commonly paired with the SpacemiT K1 SoC.
> >
> > The SpacemiT P1 support is implemented as a MFD driver, so the access is
> > done directly through the regmap interface. Reboot or poweroff is
> > triggered by setting a specific bit in a control register, which is
> > automatically cleared by the hardware afterwards.
> >
> > Signed-off-by: Aurelien Jarno <aurelien at aurel32.net>
> > Acked-by: Troy Mitchell <troy.mitchell at linux.spacemit.com>
> > Tested-by: Troy Mitchell <troy.mitchell at linux.spacemit.com>
> > ---
> > v2:
> >  - Rebase onto v6.18-rc1
> >  - Use dev_err_probe() to simplify the code
> >  - Fix indentation of patch 1
> >  - Collect Acked-by and Tested-by
> >
> >  drivers/power/reset/Kconfig              |  9 +++
> >  drivers/power/reset/Makefile             |  1 +
> >  drivers/power/reset/spacemit-p1-reboot.c | 88 ++++++++++++++++++++++++
> >  3 files changed, 98 insertions(+)
> >  create mode 100644 drivers/power/reset/spacemit-p1-reboot.c
> >
> > 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".
> 
> > +       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.
> 
I second this, you can add my RoB if with it fixed

Reviewed-by: Yixun Lan <dlan at gentoo.org>

-- 
Yixun Lan (dlan)



More information about the linux-riscv mailing list