Re: [PATCH v4 1/9] regulator: core: Add "enable and wait" functions
Chen-Yu Tsai <[email protected]> Wed, 12 Aug 2026 12:39:42 +0800
| Newsgroups | org.kernel.vger.linux-i2c,dev.linux.lists.chrome-platform,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-mediatek,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-input,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAGXv+5EeEQM6O8Vb8e8fGjRzMe1icmz=cPm3GoKLxvEO=weVcA@mail.gmail.com> |
On Tue, Aug 11, 2026 at 8:43 PM Mark Brown <[email protected]> wrote: > > On Tue, Aug 11, 2026 at 08:20:01PM +0800, Chen-Yu Tsai wrote: > > In device power sequencing and initialization use cases, it is common > > for the driver to enable the regulator and then wait for a certain > > period of time to pass before continuing. > > Please don't bury core changes for subsystems in the middle of random > other serieses, this is the first time I've seen this. :( Sorry, that is entirely my fault. I was using an old v1 recipient list on the previous two versions and that list didn't include you. > > One case in particular is not optimized yet: a regulator left on either > > by hardware reset default or by the bootloader, but does not have the > > "regulator-boot-on" property set. As the enable timestamp only gets > > updated when enabled by a consumer or by the core, the first enablement > > always needs to wait. > > Just take a timestamp during registration if the regulator is enabled, > we check if it's enabled anyway so we may as well take that as the last > time the enable happened. Yeah, I just haven't figured out where exactly in regulator_register() to put it. I think it should be after the supplies are resolved, so maybe I could do this in the "final setup" part in regulator_resolve_supply()? Thanks ChenYu