On Tue, May 11, 2021 at 10:21:27AM +0300, Andy Shevchenko wrote: > On Mon, May 10, 2021 at 10:16:41PM +0200, Stephan Gerhold wrote: > > On Mon, May 10, 2021 at 09:48:48PM +0200, Ondřej Jirman wrote: > > > > - Bulk regulator API: AFAICT there is no way to use it while also > > maintaining the correct enable/disable order plus the 10us delay. > > See https://lore.kernel.org/linux-input/X%2Fwj+bxe%2FIlznCj6@xxxxxxxxxxx/ > > This by the way can be fixed on regulator level (adding some like ranges into > bulk structure with timeouts, and if 0, skip them). > At the moment the bulk regulator API seems specifically designed to enable all the regulators at the same time (with some funky asynchronous scheduling code). I'm not sure if there is a straightforward way to fit in a sequential enable/disable order with potential delays. I'm also not entirely convinced it's worth it in this case. I would say the code in this patch (except for the dev_err_probe()) is still quite easy to read. Encoding the enable/disable order + delays in some bulk regulator struct might actually be more difficult to read. Thanks, Stephan