Re: [PATCH 3/6] pmdomain: zte: Add a zx297520v3 power domain driver

From: Ulf Hansson

Date: Tue Dec 01 2026 - 03:36:51 EST


On Thu, Nov 26, 2026 at 7:09 PM Stefan Dösinger
<stefandoesinger@xxxxxxxxx> wrote:
>
> Hi Ulf,
>
> Thanks for the review!
>
> Am Donnerstag, 26. November 2026, 15:26:20 Ostafrikanische Zeit schrieb Ulf
> Hansson:
> > This doesn't belong in this particular driver, but rather in the genpd
> > core. In fact, we have a proposed patch [1] that is being discussed;
> > but the bigger question is if we need genpd provider drivers to be
> > removable at all.
> >
> > What is your use case for this?
>
> It's extrapolated from the clock system maintainer's request to keep clk
> drivers buildable as modules. The pmdomain is even less critical than clk and
> can easily be unloaded and reloaded, even though I don't see much practical
> application.
>
> I see the following options, in order of preference:
>
> 1) Simply remove the device_link_add() call from the driver and add a line to
> the patch description that this is deliberate to maybe shut up Sashiko.
>

I suggest to start with that and consider a fix/improvement on top.

> 2) Set .suppress_bind_attrs = true and make the option bool.
>
> Note that the MFD parent is tristate and unbindable, but that should be ok as
> the pmdomain consumers target its own node.
>
> .suppress_bind_attrs = true combined with tristate isn't going to help. Unlike
> the phy subsystem, pmdomain doesn't hold a reference to the driver, so you can
> rmmod the pmdomain driver while there are active consumers.

Yeah, we need to manage module_init/exit as well, to prevent the
module from being unloaded.

On the other hand, if there really is a use case for this, perhaps we
should accept the patch that is for discussion [1]. If you think it
makes sense, please reply to that patch.

Kind regards
Uffe

[1]
https://lore.kernel.org/all/20261112-01-pm-device-link-v1-1-8932e0862378@xxxxxxxxxx/