Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1423022

Re: [RFC PATCH] regulator: introduce boot protection flag

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] regulator: introduce boot protection flag
Date 2016-06-15 15:40 +0200
Message-ID <rKjcZ-37G-11@gated-at.bofh.it> (permalink)
References <rwNuh-87C-1@gated-at.bofh.it> <rHPj4-30z-21@gated-at.bofh.it> <rKhNU-2mT-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Wed, Jun 15, 2016 at 08:05:13PM +0800, Pingbo Wen wrote:
> On Thursday, June 09, 2016 01:16 AM, Mark Brown wrote:

> > It doesn't, it postpones them until late_initacall().  This is both
> > after the consumers have loaded if they are built in and before any
> > consumers built as modules come up.

> Yes, this patch only protects a regulator from regulator
> registration(built in) to late_initcall(). But, IMO, if a regulator is
> critical, it's weird to build as a module. Maybe I was thoughtless here.

Well, this comes back to the issue with it being very use case specific
and not generally clear what critical regualtors are supposed to be.  It
really depends on what the system integrator wants, and there's things
like the distro use case where the normal thing to do is to build as
many drivers as possible as modules since you support such a huge range
of hardware.

> If we take modules under consideration, and to make this patch more
> universal, I think what we really need is adding a flag to protect a
> regulator from registration to a specific consumer(not the first
> consumer). The regulator driver gives the initial state, and the
> specific consumer need to clear this flag while finishing regulator
> setting(by calling a function like regulator_clear_protect()). And what
> the regulator core need to do is staging all operations during
> protection. And that will cover all consumers probing order, whenever
> the regulator is registered.

Having the consumer driver know that it's "critical" seems wrong since
different systems may have different ideas about that, it's probably
better to hook this in with the device model so that when the device
finishes probing that kicks things off.

> Any idea?

There were the other ideas I mentioned in my mail too.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [RFC PATCH] regulator: introduce boot protection flag Pingbo Wen <pingbo.wen@linaro.org> - 2016-06-15 14:10 +0200
  Re: [RFC PATCH] regulator: introduce boot protection flag Mark Brown <broonie@kernel.org> - 2016-06-15 15:40 +0200
    Re: [RFC PATCH] regulator: introduce boot protection flag Pingbo Wen <pingbo.wen@linaro.org> - 2016-06-17 05:40 +0200
      Re: [RFC PATCH] regulator: introduce boot protection flag Mark Brown <broonie@kernel.org> - 2016-06-17 13:50 +0200
        Re: [RFC PATCH] regulator: introduce boot protection flag Pingbo Wen <pingbo.wen@linaro.org> - 2016-06-23 14:10 +0200

csiph-web