Re: [PATCH v2 1/3] mfd: sprd-sc27xx: Integrate power off and reboot support
From: Lee Jones
Date: Thu Jan 08 2026 - 05:24:06 EST
On Wed, 26 Nov 2025, Lee Jones wrote:
> On Sun, 23 Nov 2025, Otto Pflüger wrote:
>
> > 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/
>
> Well that is quite the predicament.
>
> Let me catch-up with Rob out-of-band and see if we can come up with a
> solution.
The discussion between Rob and I led to an "agree to disagree" moment.
I still think that a node to describe this device is the correct
approach, however without Rob's blessing, you're a bit stuck.
I think your best bet at this point is to remove the
devm_of_platform_populate() and replace it with mfd_add_devices().
--
Lee Jones [李琼斯]