Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count usage

From: Mark Brown
Date: Fri Oct 04 2019 - 11:01:58 EST


On Fri, Oct 04, 2019 at 12:03:12PM +0000, Vaittinen, Matti wrote:
> On Fri, 2019-10-04 at 12:32 +0100, Mark Brown wrote:

> > If you want the regulator to be on without any driver present then
> > mark
> > it always-on. If you want the regulator to be enabled prior to the
> > driver being loaded then the expectation is that the bootloader will
> > do
> > that, it's difficult to see what the benefit there is from having the
> > kernel enable things when it starts prior to having a driver unless
> > the
> > intent is to keep the regulator always on.

> I thought the regulator-boot-on could have been used for that. But as I
> said - I don't really know all this so well =) And no, I am not opposed
> to offloading this from kernel to boot, I was just trying to learn what
> is the correct thing to do (tm). Thanks for educating me on this :) I
> will suggest adding the enabling to boot code if (when) I get questions
> concerning this. (always-on won't do for regulators which need to be
> controlled for power saving or heating issues).

If you want the kernel to do it early on without the bootloader then I
think we really need to understand the use case. My guess would be that
the underlying request would be to get the driver up earlier which is
something we should be better at but often easier said than done.

Attachment: signature.asc
Description: PGP signature