On Thu, 2019-10-10 at 15:05 +0100, Mark Brown wrote: > > On Thu, Oct 10, 2019 at 09:42:33AM +0200, Nuno Sá wrote: > > > + /* power on */ > > + ret = regulator_enable(st->iovdd); > > + if (ret) > > + return ret; > > + > > + /* there's no timing constraints before > > enabling dvdd */ > > + ret = regulator_enable(st->dvdd); > > + if (ret) { > > + regulator_disable(st->iovdd); > > + return ret; > > + } > > You could use regulator_bulk_enable() here (and similarly on > disable) but it doesn't fundamentally matter - they do guarantee > that they'll do things in sequence, though they don't wait for > the ramp to complete before kicking off the next enable in the > sequence which can be an issue for some hardware. Yes, regulator_bulk_enable() could fit. The only thing that worries me is that we only check for errors returned from regulator_enable() after all async work is done (which is probably what you mean by "they don't wait for the ramp to complete before kicking off the next enable...") which could leave us with DVDD applied without IOVDD for a short amount of time. I'm not sure this would be a really issue and that would damage the HW, but from what I can tell from the datasheet, It's not advised to apply DVDD without IOVDD. Nuno Sá