Re: [PATCH v4 1/9] regulator: core: Add "enable and wait" functions

From: Mark Brown

Date: Tue Aug 11 2026 - 08:43:36 EST


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. :(

> 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.

Attachment: signature.asc
Description: PGP signature