Messages in this thread | | | From | Javier Martinez Canillas <> | Subject | Re: [PATCH] regulator: core: Add option to prevent disabling unused regulators | Date | Thu, 02 Nov 2023 10:33:38 +0100 |
| |
Mark Brown <broonie@kernel.org> writes:
> On Wed, Nov 01, 2023 at 10:26:52AM +0530, Manivannan Sadhasivam wrote: > >> On the other note, I'm wondering if we could use sync_state() for handling the >> regulator_init_complete() work. This would ensure that the regulators are only >> disabled when all the consumers are probed. > > That assumes that everything defined in the DT both has a driver and has > the driver available for the currently running kernel neither of which > is a good assumption.
Agreed. I believe the current logic of disabling all regulators using a workqueue is the correct thing to do.
The only better option I think is to make user-space notify the kernel that it won't load kernel modules anymore. But the delayed work would sill be needed, since the kernel can't make an assumption on whether user-space will notify of this or not.
-- Best regards,
Javier Martinez Canillas Core Platforms Red Hat
| |