Re: [PATCH v2 1/3] mfd: sprd-sc27xx: Integrate power off and reboot support

From: Otto Pflüger

Date: Sun Nov 23 2025 - 12:42:33 EST


On Thu, Nov 20, 2025 at 03:30:24PM +0000, Lee Jones wrote:
> On Mon, 10 Nov 2025, Otto Pflüger wrote:
>
> > The SC27xx PMICs allow restarting and powering off the device. Since
> > this functionality is rather simple and not configurable in any way,
> > make it part of the main PMIC driver.
>
> This sounds like more of a drivers/power thing.

This was originally in drivers/power, but according to [1], it should
not be a separate device tree node. Using a separate driver without a
separate device tree node would still involve some code here that
instantiates a platform device and selects the right platform data for
it.

Registering the poweroff handler directly seemed less complex, and I
assumed it was okay since some other MFD drivers (e.g. rk8xx) also
implement the same functionality without a separate power driver.

Is it a good idea to use devm_mfd_add_devices here instead?

[1]: https://lore.kernel.org/all/20251002025344.GA2958334-robh@xxxxxxxxxx/